Message ID | 1374066449-21714-12-git-send-email-eich@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jul 17, 2013 at 11:07 PM, Egbert Eich <eich@suse.com> wrote: > Due to a missing initialization there was no way to map fbdev memory. > Thus for example using the Xserver with the fbdev driver failed. > This fix adds initialization for fix.smem_start and fix.smem_len > in the fb_info structure, which fixes this problem. I don't think this is correct, since it'll give userspace a direct phy addr for the base of the video ram, though I'm not in a position to say exactly what should be set here, guess I need to get an mgag200 machine up and running. Dave.
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 371f3eb..94c64de 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -231,6 +231,8 @@ static int mgag200fb_create(struct drm_fb_helper *helper, } info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base; info->apertures->ranges[0].size = mdev->mc.vram_size; + info->fix.smem_start = mdev->dev->mode_config.fb_base; + info->fix.smem_len = size; drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,
Due to a missing initialization there was no way to map fbdev memory. Thus for example using the Xserver with the fbdev driver failed. This fix adds initialization for fix.smem_start and fix.smem_len in the fb_info structure, which fixes this problem. Signed-off-by: Egbert Eich <eich@suse.de> --- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 ++ 1 file changed, 2 insertions(+)