summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-02-15 17:15:12 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-03-13 10:36:40 +0100
commitedc9f16763543e5f51f07164766fac8d6bc9e560 (patch)
treebb18c432cd8613dbbd4ac45de70dea483d4c6322 /drivers
parent91affdf3517e9255443dfadaf6978ffec16f859a (diff)
downloadlinux-stable-edc9f16763543e5f51f07164766fac8d6bc9e560.tar.gz
linux-stable-edc9f16763543e5f51f07164766fac8d6bc9e560.tar.bz2
linux-stable-edc9f16763543e5f51f07164766fac8d6bc9e560.zip
drm/cirrus: Remove size test from cirrus_fb_create()
The DRM core implements a size check against the mode config's limits when creating a framebuffer. [1] Remove the unnecessary test from cirrus_fb_create() and remove the now-empty function. Create framebuffers with drm_gem_fb_create_with_dirty(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_framebuffer.c#L287 # [1] Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-13-tzimmermann@suse.de
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/tiny/cirrus.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
index c1ffbbe1d545..c2d7bb775629 100644
--- a/drivers/gpu/drm/tiny/cirrus.c
+++ b/drivers/gpu/drm/tiny/cirrus.c
@@ -555,17 +555,8 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
/* cirrus framebuffers & mode config */
-static struct drm_framebuffer*
-cirrus_fb_create(struct drm_device *dev, struct drm_file *file_priv,
- const struct drm_mode_fb_cmd2 *mode_cmd)
-{
- if (cirrus_check_size(mode_cmd->width, mode_cmd->height, NULL) < 0)
- return ERR_PTR(-EINVAL);
- return drm_gem_fb_create_with_dirty(dev, file_priv, mode_cmd);
-}
-
static const struct drm_mode_config_funcs cirrus_mode_config_funcs = {
- .fb_create = cirrus_fb_create,
+ .fb_create = drm_gem_fb_create_with_dirty,
.atomic_check = drm_atomic_helper_check,
.atomic_commit = drm_atomic_helper_commit,
};