aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2017-05-18 20:52:17 -0400
committerLiviu Dudau <Liviu.Dudau@arm.com>2017-06-16 06:56:46 -0400
commite2113c036775408348cf1bd60a5659648220973f (patch)
tree78efaf422c433df53334ee32633291a74cc4158c
parent925344ccc91d7a7fd84cab2dece1c34bbd86fd8c (diff)
drm/arm: malidp: Use crtc->mode_valid() callback
Now that we have a callback to check if crtc supports a given mode we can use it in malidp so that we restrict the number of probbed modes to the ones we can actually display. Also, remove the mode_fixup() callback as this is no longer needed because mode_valid() will be called before. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@linux.ie> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
-rw-r--r--drivers/gpu/drm/arm/malidp_crtc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index 9446a673d469..4bb38a21efec 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -22,9 +22,8 @@
22#include "malidp_drv.h" 22#include "malidp_drv.h"
23#include "malidp_hw.h" 23#include "malidp_hw.h"
24 24
25static bool malidp_crtc_mode_fixup(struct drm_crtc *crtc, 25static enum drm_mode_status malidp_crtc_mode_valid(struct drm_crtc *crtc,
26 const struct drm_display_mode *mode, 26 const struct drm_display_mode *mode)
27 struct drm_display_mode *adjusted_mode)
28{ 27{
29 struct malidp_drm *malidp = crtc_to_malidp_device(crtc); 28 struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
30 struct malidp_hw_device *hwdev = malidp->dev; 29 struct malidp_hw_device *hwdev = malidp->dev;
@@ -40,11 +39,11 @@ static bool malidp_crtc_mode_fixup(struct drm_crtc *crtc,
40 if (rate != req_rate) { 39 if (rate != req_rate) {
41 DRM_DEBUG_DRIVER("pxlclk doesn't support %ld Hz\n", 40 DRM_DEBUG_DRIVER("pxlclk doesn't support %ld Hz\n",
42 req_rate); 41 req_rate);
43 return false; 42 return MODE_NOCLOCK;
44 } 43 }
45 } 44 }
46 45
47 return true; 46 return MODE_OK;
48} 47}
49 48
50static void malidp_crtc_enable(struct drm_crtc *crtc) 49static void malidp_crtc_enable(struct drm_crtc *crtc)
@@ -408,7 +407,7 @@ static int malidp_crtc_atomic_check(struct drm_crtc *crtc,
408} 407}
409 408
410static const struct drm_crtc_helper_funcs malidp_crtc_helper_funcs = { 409static const struct drm_crtc_helper_funcs malidp_crtc_helper_funcs = {
411 .mode_fixup = malidp_crtc_mode_fixup, 410 .mode_valid = malidp_crtc_mode_valid,
412 .enable = malidp_crtc_enable, 411 .enable = malidp_crtc_enable,
413 .disable = malidp_crtc_disable, 412 .disable = malidp_crtc_disable,
414 .atomic_check = malidp_crtc_atomic_check, 413 .atomic_check = malidp_crtc_atomic_check,