diff options
author | Yichi Chen <yichichen@google.com> | 2021-05-17 15:43:34 +0800 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-05-19 01:40:13 +0000 |
commit | 0b2e07a40f88744536f590dca64f31f872d50ae9 (patch) | |
tree | e4316fd728979de4d67714687b80aea12c529eee /samsung/exynos_drm_fb.c | |
parent | cd97fbbbf94770b865dd1ca413ad01fc46c1ddce (diff) | |
download | display-0b2e07a40f88744536f590dca64f31f872d50ae9.tar.gz |
drm: samsung: Correct the max width and height configs
The maximum width and height of the source buffer should respect the
dpp_drv_data. The patch sets the current configs from dst_f_w, which
matches the behavior in Composer HAL.
Bug: 187490629
Test: Show 5984x3120 and 8176x8176 surfaces correctly.
Change-Id: Id615fd05c989b3fd7de1bcc82812be8478c0cee3
Signed-off-by: Yichi Chen <yichichen@google.com>
Diffstat (limited to 'samsung/exynos_drm_fb.c')
-rw-r--r-- | samsung/exynos_drm_fb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/samsung/exynos_drm_fb.c b/samsung/exynos_drm_fb.c index 45032be..6ce9657 100644 --- a/samsung/exynos_drm_fb.c +++ b/samsung/exynos_drm_fb.c @@ -36,6 +36,8 @@ #include "exynos_drm_gem.h" #include "exynos_drm_hibernation.h" +extern const struct dpp_restriction dpp_drv_data; + static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = { .destroy = drm_gem_fb_destroy, .create_handle = drm_gem_fb_create_handle, @@ -629,12 +631,14 @@ void exynos_drm_mode_config_init(struct drm_device *dev) dev->mode_config.min_height = 0; /* - * set max width and height as default value(4096x4096). + * set min/max width and height respecting dpp_drv_data config. * this value would be used to check framebuffer size limitation * at drm_mode_addfb(). */ - dev->mode_config.max_width = 4096; - dev->mode_config.max_height = 4096; + dev->mode_config.max_width = dpp_drv_data.dst_f_w.max; + dev->mode_config.max_height = dpp_drv_data.dst_f_h.max; + dev->mode_config.min_width = dpp_drv_data.dst_f_w.min; + dev->mode_config.min_height = dpp_drv_data.dst_f_h.min; dev->mode_config.funcs = &exynos_drm_mode_config_funcs; dev->mode_config.helper_private = &exynos_drm_mode_config_helpers; |