diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-21 09:47:00 -0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-25 08:49:49 -0400 |
commit | 184bef8924c95d43c1476d21034c14c8582f487f (patch) | |
tree | 5fad617c212251863eea5dfe237314b11339aba1 | |
parent | 059b5eb5d9554dea689430ad3872dcb37a35053d (diff) |
drm: use drm_driver_legacy_fb_format in drm_gem_fbdev_fb_create
Creating framebuffers for fbdev emulation should use the correct format
code too, so switch drm_gem_fbdev_fb_create() over to use the new
drm_driver_legacy_fb_format() function.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-3-kraxel@redhat.com
-rw-r--r-- | drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c index 7607f9cd6f77..ded7a379ac35 100644 --- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c +++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c | |||
@@ -316,8 +316,8 @@ drm_gem_fbdev_fb_create(struct drm_device *dev, | |||
316 | if (pitch_align) | 316 | if (pitch_align) |
317 | mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], | 317 | mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], |
318 | pitch_align); | 318 | pitch_align); |
319 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, | 319 | mode_cmd.pixel_format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp, |
320 | sizes->surface_depth); | 320 | sizes->surface_depth); |
321 | if (obj->size < mode_cmd.pitches[0] * mode_cmd.height) | 321 | if (obj->size < mode_cmd.pitches[0] * mode_cmd.height) |
322 | return ERR_PTR(-EINVAL); | 322 | return ERR_PTR(-EINVAL); |
323 | 323 | ||