summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2019-05-16 12:31:51 +0200
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-05-20 13:35:40 +0200
commit92f080762c3f45bbcfbe35e2ac610af1ee3bb2b9 (patch)
treed5b8d22ffe1133aa725c5703ad1fcf58769d32df /drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
parentbf39607c16141811d0f5fe67e231364c96a87e09 (diff)
drm: Replace instances of drm_format_info by drm_get_format_info
drm_get_format_info directly calls into drm_format_info, but takes directly a struct drm_mode_fb_cmd2 pointer, instead of the fourcc directly. It's shorter to not dereference it, and we can customise the behaviour at the driver level if we want to, so let's switch to it where it makes sense. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/5859d68664b8f0804a56e7386937f6db986b9e0f.1558002671.git-series.maxime.ripard@bootlin.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 06e73a343724..6edae6458be8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -121,8 +121,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
struct drm_mode_fb_cmd2 *mode_cmd,
struct drm_gem_object **gobj_p)
{
- const struct drm_format_info *info = drm_get_format_info(dev,
- mode_cmd);
+ const struct drm_format_info *info;
struct amdgpu_device *adev = rfbdev->adev;
struct drm_gem_object *gobj = NULL;
struct amdgpu_bo *abo = NULL;
@@ -133,6 +132,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
int height = mode_cmd->height;
u32 cpp;
+ info = drm_get_format_info(adev->ddev, mode_cmd);
cpp = drm_format_info_plane_cpp(info, 0);
/* need to align pitch with crtc limits */