[Intel-gfx] Why set fb_base twice?
Jet Chen
jet.chent at gmail.com
Thu Sep 9 16:41:20 CEST 2010
Hi,
I was reading drm code, and found a interesting thing. In "i915_dma.c ::
i915_load_modeset_init()", we set the fb base address:
static int i915_load_modeset_init(struct drm_device *dev,
unsigned long prealloc_start,
unsigned long prealloc_size,
unsigned long agp_size)
{
struct drm_i915_private *dev_priv = dev->dev_private;
int fb_bar = IS_I9XX(dev) ? 2 : 0;
int ret = 0;
> dev->mode_config.fb_base = pci_resource_start(dev->pdev, fb_bar) &
0xff000000;
after that, "i915_load_modeset_init()" calls "intel_display.c ::
intel_modeset_init()" . In "intel_modeset_init()", we set fb_base once
again!
/* set memory base */
if (IS_I9XX(dev))
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 2);
else
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0);
Does it make any sense that set the same fb_base twice, or we can remove one
of them?
--
Jet Chen
Platform Engineering Solution - IT Flex Services,
Intel Asia-Pacific R&D Center Ltd,
+86 6116 5665
jet.chen at intel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100909/c2dee45a/attachment.html>
More information about the Intel-gfx
mailing list