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
This commit is contained in:
parent
bf39607c16
commit
92f080762c
3 changed files with 4 additions and 4 deletions
|
|
@ -232,7 +232,7 @@ static int psb_framebuffer_init(struct drm_device *dev,
|
|||
* Reject unknown formats, YUV formats, and formats with more than
|
||||
* 4 bytes per pixel.
|
||||
*/
|
||||
info = drm_format_info(mode_cmd->pixel_format);
|
||||
info = drm_get_format_info(dev, mode_cmd);
|
||||
if (!info || !info->depth || info->cpp[0] > 4)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue