[05/10] drm/cirrus: Drop redundnant gamma size check

Submitted by Daniel Vetter on March 30, 2016, 9:51 a.m.

Details

Message ID 1459331485-28376-6-git-send-email-daniel.vetter@ffwll.ch
State New
Headers show
Series "legacy gamma code cleanup" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Daniel Vetter March 30, 2016, 9:51 a.m.
The core does this for us already.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/cirrus/cirrus_mode.c | 3 ---
 1 file changed, 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index d3d8d7bfcc57..0b1a411cb89e 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -331,9 +331,6 @@  static void cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
 	struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc);
 	int i;
 
-	if (size != CIRRUS_LUT_SIZE)
-		return;
-
 	for (i = 0; i < CIRRUS_LUT_SIZE; i++) {
 		cirrus_crtc->lut_r[i] = red[i];
 		cirrus_crtc->lut_g[i] = green[i];

Comments

Op 30-03-16 om 11:51 schreef Daniel Vetter:
> The core does this for us already.
Unfortunately some other drivers do the same. :(

various variations of

end = min_t(start + size, 256);

I'll kill the rest off when killing start parameter and returning int.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>