All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] legacy gamma code cleanup
@ 2016-03-30  9:51 Daniel Vetter
  2016-03-30  9:51 ` [PATCH 01/10] drm: Initialize a linear gamma table by default Daniel Vetter
                   ` (10 more replies)
  0 siblings, 11 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

Hi all,

Inspired by the color manager work, some prep work cleanup for the legacy gamma
code. Two more things I'd like to pull off:
- rework the fbdev emulation to use the main gamma interfaces, instead of
  hand-rolling it's own.
- add some helpers to implement legacy gamma in terms of atomic and the new
  color manager stuff. Probably not too useful for i915.ko, since legacy gamma
  (which is needed to support C8) and the new color manager stuff use completely
  different hw blocks.

As usual, review&comments highly welcome.

Thanks, Daniel

Daniel Vetter (10):
  drm: Initialize a linear gamma table by default
  drm/fb-helper: Remove dead code in setcolreg
  drm/armada: Drop fb gamma_set/get functions
  drm/bochs: Drop fake gamma support
  drm/cirrus: Drop redundnant gamma size check
  drm/msm: Nuke dummy gamma_set/get functions
  drm/virtio: Drop dummy gamma table support
  drm/imx: Don't set a gamma table size
  drm/qxl: Don't set a gamma table size
  drm/tegra: Don't set a gamma table size

 drivers/gpu/drm/armada/armada_crtc.c       | 10 ---------
 drivers/gpu/drm/armada/armada_crtc.h       |  2 --
 drivers/gpu/drm/armada/armada_fbdev.c      |  2 --
 drivers/gpu/drm/bochs/bochs_fbdev.c        | 15 --------------
 drivers/gpu/drm/bochs/bochs_kms.c          |  7 -------
 drivers/gpu/drm/cirrus/cirrus_mode.c       |  3 ---
 drivers/gpu/drm/drm_crtc.c                 | 13 ++++++++++++
 drivers/gpu/drm/drm_fb_helper.c            | 33 ++----------------------------
 drivers/gpu/drm/gma500/psb_intel_display.c |  7 -------
 drivers/gpu/drm/imx/imx-drm-core.c         |  4 ----
 drivers/gpu/drm/msm/msm_fbdev.c            | 14 -------------
 drivers/gpu/drm/qxl/qxl_display.c          |  1 -
 drivers/gpu/drm/tegra/dc.c                 |  1 -
 drivers/gpu/drm/virtio/virtgpu_display.c   |  9 --------
 14 files changed, 15 insertions(+), 106 deletions(-)

-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH 01/10] drm: Initialize a linear gamma table by default
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-05-31 13:05   ` Maarten Lankhorst
  2016-03-30  9:51 ` [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg Daniel Vetter
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Code stolen from gma500.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_crtc.c                 | 13 +++++++++++++
 drivers/gpu/drm/gma500/psb_intel_display.c |  7 -------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 55ffde5a3a4a..a5bba9f023e9 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -5138,6 +5138,9 @@ EXPORT_SYMBOL(drm_mode_connector_attach_encoder);
 int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 				 int gamma_size)
 {
+	uint16_t *r_base, *g_base, *b_base;
+	int i;
+
 	crtc->gamma_size = gamma_size;
 
 	crtc->gamma_store = kcalloc(gamma_size, sizeof(uint16_t) * 3,
@@ -5147,6 +5150,16 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 		return -ENOMEM;
 	}
 
+	r_base = crtc->gamma_store;
+	g_base = r_base + gamma_size;
+	b_base = g_base + gamma_size;
+	for (i = 0; i < gamma_size; i++) {
+		r_base[i] = i << 8;
+		g_base[i] = i << 8;
+		b_base[i] = i << 8;
+	}
+
+
 	return 0;
 }
 EXPORT_SYMBOL(drm_mode_crtc_set_gamma_size);
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
index 398015be87e4..7b6c84925098 100644
--- a/drivers/gpu/drm/gma500/psb_intel_display.c
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c
@@ -491,7 +491,6 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	struct gma_crtc *gma_crtc;
 	int i;
-	uint16_t *r_base, *g_base, *b_base;
 
 	/* We allocate a extra array of drm_connector pointers
 	 * for fbdev after the crtc */
@@ -519,16 +518,10 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
 	gma_crtc->pipe = pipe;
 	gma_crtc->plane = pipe;
 
-	r_base = gma_crtc->base.gamma_store;
-	g_base = r_base + 256;
-	b_base = g_base + 256;
 	for (i = 0; i < 256; i++) {
 		gma_crtc->lut_r[i] = i;
 		gma_crtc->lut_g[i] = i;
 		gma_crtc->lut_b[i] = i;
-		r_base[i] = i << 8;
-		g_base[i] = i << 8;
-		b_base[i] = i << 8;
 
 		gma_crtc->lut_adj[i] = 0;
 	}
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
  2016-03-30  9:51 ` [PATCH 01/10] drm: Initialize a linear gamma table by default Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-05-31 13:09   ` Maarten Lankhorst
  2016-03-30  9:51 ` [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions Daniel Vetter
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

DRM fbdev emulation only supports pallete_color with depth == 8, and
truecolor with depth > 8. Handling depth == 16 for palettes is hence
dead code, let's remove it.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 33 ++-------------------------------
 1 file changed, 2 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 855108e6e1bd..39f9b8a41843 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -969,7 +969,6 @@ static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
 {
 	struct drm_fb_helper *fb_helper = info->par;
 	struct drm_framebuffer *fb = fb_helper->fb;
-	int pindex;
 
 	if (info->fix.visual == FB_VISUAL_TRUECOLOR) {
 		u32 *palette;
@@ -1001,38 +1000,10 @@ static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
 		    !fb_helper->funcs->gamma_get))
 		return -EINVAL;
 
-	pindex = regno;
+	WARN_ON(fb->bits_per_pixel != 8);
 
-	if (fb->bits_per_pixel == 16) {
-		pindex = regno << 3;
+	fb_helper->funcs->gamma_set(crtc, red, green, blue, regno);
 
-		if (fb->depth == 16 && regno > 63)
-			return -EINVAL;
-		if (fb->depth == 15 && regno > 31)
-			return -EINVAL;
-
-		if (fb->depth == 16) {
-			u16 r, g, b;
-			int i;
-			if (regno < 32) {
-				for (i = 0; i < 8; i++)
-					fb_helper->funcs->gamma_set(crtc, red,
-						green, blue, pindex + i);
-			}
-
-			fb_helper->funcs->gamma_get(crtc, &r,
-						    &g, &b,
-						    pindex >> 1);
-
-			for (i = 0; i < 4; i++)
-				fb_helper->funcs->gamma_set(crtc, r,
-							    green, b,
-							    (pindex >> 1) + i);
-		}
-	}
-
-	if (fb->depth != 16)
-		fb_helper->funcs->gamma_set(crtc, red, green, blue, pindex);
 	return 0;
 }
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
  2016-03-30  9:51 ` [PATCH 01/10] drm: Initialize a linear gamma table by default Daniel Vetter
  2016-03-30  9:51 ` [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-03-30 11:09   ` Russell King - ARM Linux
  2016-03-30  9:51 ` [PATCH 04/10] drm/bochs: Drop fake gamma support Daniel Vetter
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Russell King

The fb helper private gamma_set/get functions are only required when
the driver supports paletted 8bit mode with fbdev. Armada uses 32bpp
unconditionally, so this is just dead code. It also doesn't do
anything really. Let's just remove it.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/armada/armada_crtc.c  | 10 ----------
 drivers/gpu/drm/armada/armada_crtc.h  |  2 --
 drivers/gpu/drm/armada/armada_fbdev.c |  2 --
 3 files changed, 14 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 0293eb74d777..f2979655e100 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -317,16 +317,6 @@ static void armada_drm_vblank_off(struct armada_crtc *dcrtc)
 	armada_drm_plane_work_run(dcrtc, plane);
 }
 
-void armada_drm_crtc_gamma_set(struct drm_crtc *crtc, u16 r, u16 g, u16 b,
-	int idx)
-{
-}
-
-void armada_drm_crtc_gamma_get(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
-	int idx)
-{
-}
-
 /* The mode_config.mutex will be held for this call */
 static void armada_drm_crtc_dpms(struct drm_crtc *crtc, int dpms)
 {
diff --git a/drivers/gpu/drm/armada/armada_crtc.h b/drivers/gpu/drm/armada/armada_crtc.h
index 04fdd22d483b..6e2770343856 100644
--- a/drivers/gpu/drm/armada/armada_crtc.h
+++ b/drivers/gpu/drm/armada/armada_crtc.h
@@ -92,8 +92,6 @@ struct armada_crtc {
 };
 #define drm_to_armada_crtc(c) container_of(c, struct armada_crtc, crtc)
 
-void armada_drm_crtc_gamma_set(struct drm_crtc *, u16, u16, u16, int);
-void armada_drm_crtc_gamma_get(struct drm_crtc *, u16 *, u16 *, u16 *, int);
 void armada_drm_crtc_disable_irq(struct armada_crtc *, u32);
 void armada_drm_crtc_enable_irq(struct armada_crtc *, u32);
 void armada_drm_crtc_update_regs(struct armada_crtc *, struct armada_regs *);
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index 7d03c51abcb9..7781bac2ada2 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -124,8 +124,6 @@ static int armada_fb_probe(struct drm_fb_helper *fbh,
 }
 
 static const struct drm_fb_helper_funcs armada_fb_helper_funcs = {
-	.gamma_set	= armada_drm_crtc_gamma_set,
-	.gamma_get	= armada_drm_crtc_gamma_get,
 	.fb_probe	= armada_fb_probe,
 };
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 04/10] drm/bochs: Drop fake gamma support
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (2 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-04-01  8:37   ` Gerd Hoffmann
  2016-03-30  9:51 ` [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check Daniel Vetter
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Dave Airlie

Only really needed for fbdev emulation at 8bpp. And bochs doesn't do
that. And either way bochs only does 32bit rgb, so this is all pretty
much wasted dead code.

The only consideration is that we need to not set up any gamma size
either.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/bochs/bochs_fbdev.c | 15 ---------------
 drivers/gpu/drm/bochs/bochs_kms.c   |  7 -------
 2 files changed, 22 deletions(-)

diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
index 7520bf81fc25..369f11f10c72 100644
--- a/drivers/gpu/drm/bochs/bochs_fbdev.c
+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
@@ -162,22 +162,7 @@ static int bochs_fbdev_destroy(struct bochs_device *bochs)
 	return 0;
 }
 
-void bochs_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
-			u16 blue, int regno)
-{
-}
-
-void bochs_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
-			u16 *blue, int regno)
-{
-	*red   = regno;
-	*green = regno;
-	*blue  = regno;
-}
-
 static const struct drm_fb_helper_funcs bochs_fb_helper_funcs = {
-	.gamma_set = bochs_fb_gamma_set,
-	.gamma_get = bochs_fb_gamma_get,
 	.fb_probe = bochsfb_create,
 };
 
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 96926f09e0c9..89adfd916a7c 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -93,11 +93,6 @@ static void bochs_crtc_commit(struct drm_crtc *crtc)
 {
 }
 
-static void bochs_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
-				 u16 *blue, uint32_t start, uint32_t size)
-{
-}
-
 static int bochs_crtc_page_flip(struct drm_crtc *crtc,
 				struct drm_framebuffer *fb,
 				struct drm_pending_vblank_event *event,
@@ -120,7 +115,6 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc,
 
 /* These provide the minimum set of functions required to handle a CRTC */
 static const struct drm_crtc_funcs bochs_crtc_funcs = {
-	.gamma_set = bochs_crtc_gamma_set,
 	.set_config = drm_crtc_helper_set_config,
 	.destroy = drm_crtc_cleanup,
 	.page_flip = bochs_crtc_page_flip,
@@ -140,7 +134,6 @@ static void bochs_crtc_init(struct drm_device *dev)
 	struct drm_crtc *crtc = &bochs->crtc;
 
 	drm_crtc_init(dev, crtc, &bochs_crtc_funcs);
-	drm_mode_crtc_set_gamma_size(crtc, 256);
 	drm_crtc_helper_add(crtc, &bochs_helper_funcs);
 }
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (3 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 04/10] drm/bochs: Drop fake gamma support Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-05-31 13:11   ` Maarten Lankhorst
  2016-03-30  9:51 ` [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions Daniel Vetter
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Dave Airlie

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(-)

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];
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (4 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-05-31 13:18   ` Maarten Lankhorst
  2016-03-30  9:51 ` [PATCH 07/10] drm/virtio: Drop dummy gamma table support Daniel Vetter
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Again the fbdev emulation gamma_set/get functions are only needed for
drivers that try to also use 8bpp paletted mode. Which msm doesn't, so
this is dead code. Let's rip it out.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/msm/msm_fbdev.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index d9759bf3482e..1a061e3e8b9e 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -184,21 +184,7 @@ fail:
 	return ret;
 }
 
-static void msm_crtc_fb_gamma_set(struct drm_crtc *crtc,
-		u16 red, u16 green, u16 blue, int regno)
-{
-	DBG("fbdev: set gamma");
-}
-
-static void msm_crtc_fb_gamma_get(struct drm_crtc *crtc,
-		u16 *red, u16 *green, u16 *blue, int regno)
-{
-	DBG("fbdev: get gamma");
-}
-
 static const struct drm_fb_helper_funcs msm_fb_helper_funcs = {
-	.gamma_set = msm_crtc_fb_gamma_set,
-	.gamma_get = msm_crtc_fb_gamma_get,
 	.fb_probe = msm_fbdev_create,
 };
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 07/10] drm/virtio: Drop dummy gamma table support
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (5 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-04-01  8:38   ` Gerd Hoffmann
  2016-04-12 13:58   ` Emil Velikov
  2016-03-30  9:51 ` [PATCH 08/10] drm/imx: Don't set a gamma table size Daniel Vetter
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Dave Airlie

No need to confuse userspace like this.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/virtio/virtgpu_display.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 4854dac87e24..12b72e29678a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -38,13 +38,6 @@
 #define XRES_MAX  8192
 #define YRES_MAX  8192
 
-static void virtio_gpu_crtc_gamma_set(struct drm_crtc *crtc,
-				      u16 *red, u16 *green, u16 *blue,
-				      uint32_t start, uint32_t size)
-{
-	/* TODO */
-}
-
 static void
 virtio_gpu_hide_cursor(struct virtio_gpu_device *vgdev,
 		       struct virtio_gpu_output *output)
@@ -173,7 +166,6 @@ static int virtio_gpu_page_flip(struct drm_crtc *crtc,
 static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
 	.cursor_set2            = virtio_gpu_crtc_cursor_set,
 	.cursor_move            = virtio_gpu_crtc_cursor_move,
-	.gamma_set              = virtio_gpu_crtc_gamma_set,
 	.set_config             = drm_atomic_helper_set_config,
 	.destroy                = drm_crtc_cleanup,
 
@@ -416,7 +408,6 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
 		return PTR_ERR(plane);
 	drm_crtc_init_with_planes(dev, crtc, plane, NULL,
 				  &virtio_gpu_crtc_funcs, NULL);
-	drm_mode_crtc_set_gamma_size(crtc, 256);
 	drm_crtc_helper_add(crtc, &virtio_gpu_crtc_helper_funcs);
 	plane->crtc = crtc;
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 08/10] drm/imx: Don't set a gamma table size
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (6 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 07/10] drm/virtio: Drop dummy gamma table support Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-03-30 13:36   ` Philipp Zabel
  2016-03-30  9:51 ` [PATCH 09/10] drm/qxl: " Daniel Vetter
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Russell King

imx doesn't have any functions for setting the gamma table, so this is
completely defunct.

Not nice to lie to userspace, so let's stop!

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/imx/imx-drm-core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index 9876e0f0c3e1..21a52937f9cd 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -351,10 +351,6 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
 
 	*new_crtc = imx_drm_crtc;
 
-	ret = drm_mode_crtc_set_gamma_size(imx_drm_crtc->crtc, 256);
-	if (ret)
-		goto err_register;
-
 	drm_crtc_helper_add(crtc,
 			imx_drm_crtc->imx_drm_helper_funcs.crtc_helper_funcs);
 
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 09/10] drm/qxl: Don't set a gamma table size
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (7 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 08/10] drm/imx: Don't set a gamma table size Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-05-31 13:17   ` Maarten Lankhorst
  2016-03-30  9:51 ` [PATCH 10/10] drm/tegra: " Daniel Vetter
  2016-03-31  7:15 ` ✗ Fi.CI.BAT: failure for legacy gamma code cleanup Patchwork
  10 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development, Dave Airlie

qxl doesn't have any functions for setting the gamma table, so this is
completely defunct.

Not nice to lie to userspace, so let's stop!

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

diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 030409a3ee4e..21c70952402d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -729,7 +729,6 @@ static int qdev_crtc_init(struct drm_device *dev, int crtc_id)
 
 	drm_crtc_init(dev, &qxl_crtc->base, &qxl_crtc_funcs);
 	qxl_crtc->index = crtc_id;
-	drm_mode_crtc_set_gamma_size(&qxl_crtc->base, 256);
 	drm_crtc_helper_add(&qxl_crtc->base, &qxl_crtc_helper_funcs);
 	return 0;
 }
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 10/10] drm/tegra: Don't set a gamma table size
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (8 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 09/10] drm/qxl: " Daniel Vetter
@ 2016-03-30  9:51 ` Daniel Vetter
  2016-03-30 12:39   ` Thierry Reding
  2016-03-31 10:33   ` Thierry Reding
  2016-03-31  7:15 ` ✗ Fi.CI.BAT: failure for legacy gamma code cleanup Patchwork
  10 siblings, 2 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30  9:51 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Thierry Reding, Daniel Vetter

tegra doesn't have any functions to set gamma tables, so this is
completely defunct.

Not nice to lie to userspace, so let's stop!

Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/tegra/dc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index fb2b4b0271a2..3b85a31b625d 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1722,7 +1722,6 @@ static int tegra_dc_init(struct host1x_client *client)
 	if (err < 0)
 		goto cleanup;
 
-	drm_mode_crtc_set_gamma_size(&dc->base, 256);
 	drm_crtc_helper_add(&dc->base, &tegra_crtc_helper_funcs);
 
 	/*
-- 
2.8.0.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions
  2016-03-30  9:51 ` [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions Daniel Vetter
@ 2016-03-30 11:09   ` Russell King - ARM Linux
  2016-03-30 11:19     ` Daniel Vetter
  0 siblings, 1 reply; 34+ messages in thread
From: Russell King - ARM Linux @ 2016-03-30 11:09 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Mar 30, 2016 at 11:51:18AM +0200, Daniel Vetter wrote:
> The fb helper private gamma_set/get functions are only required when
> the driver supports paletted 8bit mode with fbdev. Armada uses 32bpp
> unconditionally, so this is just dead code. It also doesn't do
> anything really. Let's just remove it.

This comment is misleading: Armada supports 16bpp formats as well as
32bpp, and the hardware does have 8bpp modes to, but I've chosen not
to support the 8bpp modes.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions
  2016-03-30 11:09   ` Russell King - ARM Linux
@ 2016-03-30 11:19     ` Daniel Vetter
  2016-03-30 12:56       ` Russell King - ARM Linux
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30 11:19 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Mar 30, 2016 at 1:09 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Mar 30, 2016 at 11:51:18AM +0200, Daniel Vetter wrote:
>> The fb helper private gamma_set/get functions are only required when
>> the driver supports paletted 8bit mode with fbdev. Armada uses 32bpp
>> unconditionally, so this is just dead code. It also doesn't do
>> anything really. Let's just remove it.
>
> This comment is misleading: Armada supports 16bpp formats as well as
> 32bpp, and the hardware does have 8bpp modes to, but I've chosen not
> to support the 8bpp modes.

This is purely about the fbdev emulation (and yeah need to clarify
that), not about kms support in general. And these two gamma_set/get
hooks are _only_ used by the fbdev emulation, and only needed if you
do 8bit paletted mode. Ok if I change the commit message to "Armada
used 32bpp unconditionally for fbdev emulation, ..."?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 10/10] drm/tegra: Don't set a gamma table size
  2016-03-30  9:51 ` [PATCH 10/10] drm/tegra: " Daniel Vetter
@ 2016-03-30 12:39   ` Thierry Reding
  2016-03-30 15:31     ` Daniel Vetter
  2016-03-31 10:33   ` Thierry Reding
  1 sibling, 1 reply; 34+ messages in thread
From: Thierry Reding @ 2016-03-30 12:39 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Daniel Vetter, Intel Graphics Development, Thierry Reding,
	DRI Development


[-- Attachment #1.1: Type: text/plain, Size: 503 bytes --]

On Wed, Mar 30, 2016 at 11:51:25AM +0200, Daniel Vetter wrote:
> tegra doesn't have any functions to set gamma tables, so this is
> completely defunct.
> 
> Not nice to lie to userspace, so let's stop!
> 
> Cc: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/tegra/dc.c | 1 -
>  1 file changed, 1 deletion(-)

Do you want this to go through the Tegra tree or do you have follow-up
work that depends on this?

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions
  2016-03-30 11:19     ` Daniel Vetter
@ 2016-03-30 12:56       ` Russell King - ARM Linux
  2016-03-30 15:29         ` Daniel Vetter
  0 siblings, 1 reply; 34+ messages in thread
From: Russell King - ARM Linux @ 2016-03-30 12:56 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Mar 30, 2016 at 01:19:21PM +0200, Daniel Vetter wrote:
> On Wed, Mar 30, 2016 at 1:09 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Wed, Mar 30, 2016 at 11:51:18AM +0200, Daniel Vetter wrote:
> >> The fb helper private gamma_set/get functions are only required when
> >> the driver supports paletted 8bit mode with fbdev. Armada uses 32bpp
> >> unconditionally, so this is just dead code. It also doesn't do
> >> anything really. Let's just remove it.
> >
> > This comment is misleading: Armada supports 16bpp formats as well as
> > 32bpp, and the hardware does have 8bpp modes to, but I've chosen not
> > to support the 8bpp modes.
> 
> This is purely about the fbdev emulation (and yeah need to clarify
> that), not about kms support in general. And these two gamma_set/get
> hooks are _only_ used by the fbdev emulation, and only needed if you
> do 8bit paletted mode. Ok if I change the commit message to "Armada
> used 32bpp unconditionally for fbdev emulation, ..."?

I still don't know where you get that from - the armada fbdev code
supports more than just 32bpp.  Please explain.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 08/10] drm/imx: Don't set a gamma table size
  2016-03-30  9:51 ` [PATCH 08/10] drm/imx: Don't set a gamma table size Daniel Vetter
@ 2016-03-30 13:36   ` Philipp Zabel
  0 siblings, 0 replies; 34+ messages in thread
From: Philipp Zabel @ 2016-03-30 13:36 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Russell King, Intel Graphics Development, DRI Development, Daniel Vetter

Hi Daniel,

Am Mittwoch, den 30.03.2016, 11:51 +0200 schrieb Daniel Vetter:
> imx doesn't have any functions for setting the gamma table, so this is
> completely defunct.
> 
> Not nice to lie to userspace, so let's stop!

Thank you for the patch. Now the ret variable and the err_register label
are both unused, so I have applied it with the following fixup:

diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index 21a5293..e26dcde 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -326,7 +326,6 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
 {
        struct imx_drm_device *imxdrm = drm->dev_private;
        struct imx_drm_crtc *imx_drm_crtc;
-       int ret;
 
        /*
         * The vblank arrays are dimensioned by MAX_CRTC - we can't
@@ -358,11 +357,6 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
                        imx_drm_crtc->imx_drm_helper_funcs.crtc_funcs, NULL);
 
        return 0;
-
-err_register:
-       imxdrm->crtc[--imxdrm->pipes] = NULL;
-       kfree(imx_drm_crtc);
-       return ret;
 }
 EXPORT_SYMBOL_GPL(imx_drm_add_crtc);

regards
Philipp

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions
  2016-03-30 12:56       ` Russell King - ARM Linux
@ 2016-03-30 15:29         ` Daniel Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30 15:29 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Wed, Mar 30, 2016 at 01:56:06PM +0100, Russell King - ARM Linux wrote:
> On Wed, Mar 30, 2016 at 01:19:21PM +0200, Daniel Vetter wrote:
> > On Wed, Mar 30, 2016 at 1:09 PM, Russell King - ARM Linux
> > <linux@arm.linux.org.uk> wrote:
> > > On Wed, Mar 30, 2016 at 11:51:18AM +0200, Daniel Vetter wrote:
> > >> The fb helper private gamma_set/get functions are only required when
> > >> the driver supports paletted 8bit mode with fbdev. Armada uses 32bpp
> > >> unconditionally, so this is just dead code. It also doesn't do
> > >> anything really. Let's just remove it.
> > >
> > > This comment is misleading: Armada supports 16bpp formats as well as
> > > 32bpp, and the hardware does have 8bpp modes to, but I've chosen not
> > > to support the 8bpp modes.
> > 
> > This is purely about the fbdev emulation (and yeah need to clarify
> > that), not about kms support in general. And these two gamma_set/get
> > hooks are _only_ used by the fbdev emulation, and only needed if you
> > do 8bit paletted mode. Ok if I change the commit message to "Armada
> > used 32bpp unconditionally for fbdev emulation, ..."?
> 
> I still don't know where you get that from - the armada fbdev code
> supports more than just 32bpp.  Please explain.

Ok, I lost myself in the code and missed the cmdline parsing of fbdev
depth. So seems indeed possible to create a 8bit fbdev on armada (since
armada_framebuffer_create won't reject it, and I didn't see anything
else). I'll drop this patch. Thanks for the feedback.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 10/10] drm/tegra: Don't set a gamma table size
  2016-03-30 12:39   ` Thierry Reding
@ 2016-03-30 15:31     ` Daniel Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-03-30 15:31 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Daniel Vetter, Intel Graphics Development, Thierry Reding,
	DRI Development, Daniel Vetter

On Wed, Mar 30, 2016 at 02:39:22PM +0200, Thierry Reding wrote:
> On Wed, Mar 30, 2016 at 11:51:25AM +0200, Daniel Vetter wrote:
> > tegra doesn't have any functions to set gamma tables, so this is
> > completely defunct.
> > 
> > Not nice to lie to userspace, so let's stop!
> > 
> > Cc: Thierry Reding <treding@nvidia.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/tegra/dc.c | 1 -
> >  1 file changed, 1 deletion(-)
> 
> Do you want this to go through the Tegra tree or do you have follow-up
> work that depends on this?

Driver trees is fine, pls just confirm when you do so (to make sure I
don't accidentally merge it too).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* ✗ Fi.CI.BAT: failure for legacy gamma code cleanup
  2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
                   ` (9 preceding siblings ...)
  2016-03-30  9:51 ` [PATCH 10/10] drm/tegra: " Daniel Vetter
@ 2016-03-31  7:15 ` Patchwork
  10 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2016-03-31  7:15 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: legacy gamma code cleanup
URL   : https://patchwork.freedesktop.org/series/5037/
State : failure

== Summary ==

Series 5037v1 legacy gamma code cleanup
http://patchwork.freedesktop.org/api/1.0/series/5037/revisions/1/mbox/

Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bsw-nuc-2)

bdw-nuci7        total:196  pass:184  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:196  pass:175  dwarn:0   dfail:0   fail:0   skip:21 
bsw-nuc-2        total:196  pass:157  dwarn:1   dfail:0   fail:1   skip:37 
byt-nuc          total:196  pass:161  dwarn:0   dfail:0   fail:0   skip:35 
hsw-gt2          total:62   pass:56   dwarn:0   dfail:0   fail:0   skip:5  
skl-i7k-2        total:196  pass:173  dwarn:0   dfail:0   fail:0   skip:23 

Results at /archive/results/CI_IGT_test/Patchwork_1743/

0b513f37162f39401fe8fd2c1cb35b74212f367e drm-intel-nightly: 2016y-03m-31d-06h-04m-59s UTC integration manifest
4f0351f74b4a0949f9477348e69a194e39bb351e drm/tegra: Don't set a gamma table size
84b511bf9dc6ef362843c2b7a1cf852615ce1450 drm/qxl: Don't set a gamma table size
1fa7cea871f38dfc814d606381ef316fa2ae02cd drm/imx: Don't set a gamma table size
f3fa1848b96d695ba4820da4b88dfb92d941a44b drm/virtio: Drop dummy gamma table support
9e2f624f1ec67a5d77b8324f642a9554a833485c drm/msm: Nuke dummy gamma_set/get functions
92e4dc00f2da245a954760c9b128b0c63e084009 drm/cirrus: Drop redundnant gamma size check
8652f4343171e7a4b9599cae27406be7f9d693fb drm/bochs: Drop fake gamma support
76ae578deb6d5f33a4fa4c00c70fb61b3f416246 drm/armada: Drop fb gamma_set/get functions
7ed0be65b1a77d09c37f80925d05d24843709a9b drm/fb-helper: Remove dead code in setcolreg
968022e5cae96de722d8a936950713437d9f6370 drm: Initialize a linear gamma table by default

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 10/10] drm/tegra: Don't set a gamma table size
  2016-03-30  9:51 ` [PATCH 10/10] drm/tegra: " Daniel Vetter
  2016-03-30 12:39   ` Thierry Reding
@ 2016-03-31 10:33   ` Thierry Reding
  1 sibling, 0 replies; 34+ messages in thread
From: Thierry Reding @ 2016-03-31 10:33 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development


[-- Attachment #1.1: Type: text/plain, Size: 421 bytes --]

On Wed, Mar 30, 2016 at 11:51:25AM +0200, Daniel Vetter wrote:
> tegra doesn't have any functions to set gamma tables, so this is
> completely defunct.
> 
> Not nice to lie to userspace, so let's stop!
> 
> Cc: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/tegra/dc.c | 1 -
>  1 file changed, 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/10] drm/bochs: Drop fake gamma support
  2016-03-30  9:51 ` [PATCH 04/10] drm/bochs: Drop fake gamma support Daniel Vetter
@ 2016-04-01  8:37   ` Gerd Hoffmann
  0 siblings, 0 replies; 34+ messages in thread
From: Gerd Hoffmann @ 2016-04-01  8:37 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, Intel Graphics Development, DRI Development, Daniel Vetter

On Mi, 2016-03-30 at 11:51 +0200, Daniel Vetter wrote:
> Only really needed for fbdev emulation at 8bpp. And bochs doesn't do
> that. And either way bochs only does 32bit rgb, so this is all pretty
> much wasted dead code.

Pointless leftover when I copyed things over from cirrus.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 07/10] drm/virtio: Drop dummy gamma table support
  2016-03-30  9:51 ` [PATCH 07/10] drm/virtio: Drop dummy gamma table support Daniel Vetter
@ 2016-04-01  8:38   ` Gerd Hoffmann
  2016-04-12 11:14     ` Daniel Vetter
  2016-04-12 13:58   ` Emil Velikov
  1 sibling, 1 reply; 34+ messages in thread
From: Gerd Hoffmann @ 2016-04-01  8:38 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, Intel Graphics Development, DRI Development, Daniel Vetter

On Mi, 2016-03-30 at 11:51 +0200, Daniel Vetter wrote:
> No need to confuse userspace like this.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 07/10] drm/virtio: Drop dummy gamma table support
  2016-04-01  8:38   ` Gerd Hoffmann
@ 2016-04-12 11:14     ` Daniel Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-04-12 11:14 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development,
	DRI Development, Dave Airlie

On Fri, Apr 01, 2016 at 10:38:09AM +0200, Gerd Hoffmann wrote:
> On Mi, 2016-03-30 at 11:51 +0200, Daniel Vetter wrote:
> > No need to confuse userspace like this.
> 
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

This and the bochs one applied to drm-misc, thanks for your review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 07/10] drm/virtio: Drop dummy gamma table support
  2016-03-30  9:51 ` [PATCH 07/10] drm/virtio: Drop dummy gamma table support Daniel Vetter
  2016-04-01  8:38   ` Gerd Hoffmann
@ 2016-04-12 13:58   ` Emil Velikov
  2016-04-12 14:27     ` Julia Lawall
  1 sibling, 1 reply; 34+ messages in thread
From: Emil Velikov @ 2016-04-12 13:58 UTC (permalink / raw)
  To: Daniel Vetter, Julia Lawall
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development, Dave Airlie

On 30 March 2016 at 10:51, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> No need to confuse userspace like this.
>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_display.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> index 4854dac87e24..12b72e29678a 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> @@ -38,13 +38,6 @@
>  #define XRES_MAX  8192
>  #define YRES_MAX  8192
>
> -static void virtio_gpu_crtc_gamma_set(struct drm_crtc *crtc,
> -                                     u16 *red, u16 *green, u16 *blue,
> -                                     uint32_t start, uint32_t size)
> -{
> -       /* TODO */
> -}
> -
>  static void
>  virtio_gpu_hide_cursor(struct virtio_gpu_device *vgdev,
>                        struct virtio_gpu_output *output)
> @@ -173,7 +166,6 @@ static int virtio_gpu_page_flip(struct drm_crtc *crtc,
>  static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
>         .cursor_set2            = virtio_gpu_crtc_cursor_set,
>         .cursor_move            = virtio_gpu_crtc_cursor_move,
> -       .gamma_set              = virtio_gpu_crtc_gamma_set,
>         .set_config             = drm_atomic_helper_set_config,
>         .destroy                = drm_crtc_cleanup,
>
> @@ -416,7 +408,6 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
>                 return PTR_ERR(plane);
>         drm_crtc_init_with_planes(dev, crtc, plane, NULL,
>                                   &virtio_gpu_crtc_funcs, NULL);
> -       drm_mode_crtc_set_gamma_size(crtc, 256);
>         drm_crtc_helper_add(crtc, &virtio_gpu_crtc_helper_funcs);
>         plane->crtc = crtc;
>
Out of curiosity:

Coccinelle should be able to handle/generate such patches, shouldn't
it ? I believe in the past people used it for similar
refactoring/cleanups, yet not (m)any of them [the cocci files] got
checked in the kernel tree.

Thinking about future drivers derived from outdated sources - do you
think it's a good/bad idea to check/run them along side the existing
ones ?

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 07/10] drm/virtio: Drop dummy gamma table support
  2016-04-12 13:58   ` Emil Velikov
@ 2016-04-12 14:27     ` Julia Lawall
  0 siblings, 0 replies; 34+ messages in thread
From: Julia Lawall @ 2016-04-12 14:27 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Julia Lawall, Dave Airlie, Daniel Vetter



On Tue, 12 Apr 2016, Emil Velikov wrote:

> On 30 March 2016 at 10:51, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > No need to confuse userspace like this.
> >
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Dave Airlie <airlied@redhat.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/virtio/virtgpu_display.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> > index 4854dac87e24..12b72e29678a 100644
> > --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> > @@ -38,13 +38,6 @@
> >  #define XRES_MAX  8192
> >  #define YRES_MAX  8192
> >
> > -static void virtio_gpu_crtc_gamma_set(struct drm_crtc *crtc,
> > -                                     u16 *red, u16 *green, u16 *blue,
> > -                                     uint32_t start, uint32_t size)
> > -{
> > -       /* TODO */
> > -}
> > -
> >  static void
> >  virtio_gpu_hide_cursor(struct virtio_gpu_device *vgdev,
> >                        struct virtio_gpu_output *output)
> > @@ -173,7 +166,6 @@ static int virtio_gpu_page_flip(struct drm_crtc *crtc,
> >  static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
> >         .cursor_set2            = virtio_gpu_crtc_cursor_set,
> >         .cursor_move            = virtio_gpu_crtc_cursor_move,
> > -       .gamma_set              = virtio_gpu_crtc_gamma_set,
> >         .set_config             = drm_atomic_helper_set_config,
> >         .destroy                = drm_crtc_cleanup,
> >
> > @@ -416,7 +408,6 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
> >                 return PTR_ERR(plane);
> >         drm_crtc_init_with_planes(dev, crtc, plane, NULL,
> >                                   &virtio_gpu_crtc_funcs, NULL);
> > -       drm_mode_crtc_set_gamma_size(crtc, 256);
> >         drm_crtc_helper_add(crtc, &virtio_gpu_crtc_helper_funcs);
> >         plane->crtc = crtc;
> >
> Out of curiosity:
>
> Coccinelle should be able to handle/generate such patches, shouldn't
> it ? I believe in the past people used it for similar
> refactoring/cleanups, yet not (m)any of them [the cocci files] got
> checked in the kernel tree.
>
> Thinking about future drivers derived from outdated sources - do you
> think it's a good/bad idea to check/run them along side the existing
> ones ?

The issue is that there is no point to put an empty function in a
structure?

It would be a bit subtle for Coccinelle, because it requires also knowing
that one is allowed to leave that particular field empty.

julia
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/10] drm: Initialize a linear gamma table by default
  2016-03-30  9:51 ` [PATCH 01/10] drm: Initialize a linear gamma table by default Daniel Vetter
@ 2016-05-31 13:05   ` Maarten Lankhorst
  2016-05-31 13:24     ` Daniel Vetter
  0 siblings, 1 reply; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:05 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

Op 30-03-16 om 11:51 schreef Daniel Vetter:
> Code stolen from gma500.
It would be useful to mention why this is done. :)

But even with this patch it seems the legacy gamma in gamma_get is not very reliable.
A failed call to gamma_set could leave wrong values in crtc->gamma_store either by calling the ioctl with lut.blue set to NULL, or call gamma_set and interrupt with a signal.
For atomic color management get_gamma won't be accurate at all if mixed with new color management.

~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg
  2016-03-30  9:51 ` [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg Daniel Vetter
@ 2016-05-31 13:09   ` Maarten Lankhorst
  2016-05-31 13:25     ` Daniel Vetter
  0 siblings, 1 reply; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:09 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

Op 30-03-16 om 11:51 schreef Daniel Vetter:
> DRM fbdev emulation only supports pallete_color with depth == 8, and
> truecolor with depth > 8. Handling depth == 16 for palettes is hence
> dead code, let's remove it.
Hooray, less chance for failure!

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check
  2016-03-30  9:51 ` [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check Daniel Vetter
@ 2016-05-31 13:11   ` Maarten Lankhorst
  0 siblings, 0 replies; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:11 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Dave Airlie

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>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 09/10] drm/qxl: Don't set a gamma table size
  2016-03-30  9:51 ` [PATCH 09/10] drm/qxl: " Daniel Vetter
@ 2016-05-31 13:17   ` Maarten Lankhorst
  2016-05-31 13:27     ` Daniel Vetter
  0 siblings, 1 reply; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:17 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Dave Airlie

Op 30-03-16 om 11:51 schreef Daniel Vetter:
> qxl doesn't have any functions for setting the gamma table, so this is
> completely defunct.
>
> Not nice to lie to userspace, so let's stop!
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions
  2016-03-30  9:51 ` [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions Daniel Vetter
@ 2016-05-31 13:18   ` Maarten Lankhorst
  0 siblings, 0 replies; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:18 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

Op 30-03-16 om 11:51 schreef Daniel Vetter:
> Again the fbdev emulation gamma_set/get functions are only needed for
> drivers that try to also use 8bpp paletted mode. Which msm doesn't, so
> this is dead code. Let's rip it out.
>
> Cc: Rob Clark <robdclark@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/10] drm: Initialize a linear gamma table by default
  2016-05-31 13:05   ` Maarten Lankhorst
@ 2016-05-31 13:24     ` Daniel Vetter
  2016-05-31 13:30       ` Maarten Lankhorst
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Vetter @ 2016-05-31 13:24 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, May 31, 2016 at 03:05:32PM +0200, Maarten Lankhorst wrote:
> Op 30-03-16 om 11:51 schreef Daniel Vetter:
> > Code stolen from gma500.
> It would be useful to mention why this is done. :)
> 
> But even with this patch it seems the legacy gamma in gamma_get is not very reliable.
> A failed call to gamma_set could leave wrong values in crtc->gamma_store either by calling the ioctl with lut.blue set to NULL, or call gamma_set and interrupt with a signal.
> For atomic color management get_gamma won't be accurate at all if mixed with new color management.

Hm, it's just some safety code I found laying around, and figured that
looks like a good idea. You think it's worth it with some improved commit
message added?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg
  2016-05-31 13:09   ` Maarten Lankhorst
@ 2016-05-31 13:25     ` Daniel Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-05-31 13:25 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, May 31, 2016 at 03:09:42PM +0200, Maarten Lankhorst wrote:
> Op 30-03-16 om 11:51 schreef Daniel Vetter:
> > DRM fbdev emulation only supports pallete_color with depth == 8, and
> > truecolor with depth > 8. Handling depth == 16 for palettes is hence
> > dead code, let's remove it.
> Hooray, less chance for failure!
> 
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Applied to drm-misc, thanks for the review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 09/10] drm/qxl: Don't set a gamma table size
  2016-05-31 13:17   ` Maarten Lankhorst
@ 2016-05-31 13:27     ` Daniel Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Vetter @ 2016-05-31 13:27 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Daniel Vetter, Intel Graphics Development, Dave Airlie,
	DRI Development, Daniel Vetter

On Tue, May 31, 2016 at 03:17:57PM +0200, Maarten Lankhorst wrote:
> Op 30-03-16 om 11:51 schreef Daniel Vetter:
> > qxl doesn't have any functions for setting the gamma table, so this is
> > completely defunct.
> >
> > Not nice to lie to userspace, so let's stop!
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Applied the other patches you've reviewed, too. Thanks for the reviews.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/10] drm: Initialize a linear gamma table by default
  2016-05-31 13:24     ` Daniel Vetter
@ 2016-05-31 13:30       ` Maarten Lankhorst
  0 siblings, 0 replies; 34+ messages in thread
From: Maarten Lankhorst @ 2016-05-31 13:30 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

Op 31-05-16 om 15:24 schreef Daniel Vetter:
> On Tue, May 31, 2016 at 03:05:32PM +0200, Maarten Lankhorst wrote:
>> Op 30-03-16 om 11:51 schreef Daniel Vetter:
>>> Code stolen from gma500.
>> It would be useful to mention why this is done. :)
>>
>> But even with this patch it seems the legacy gamma in gamma_get is not very reliable.
>> A failed call to gamma_set could leave wrong values in crtc->gamma_store either by calling the ioctl with lut.blue set to NULL, or call gamma_set and interrupt with a signal.
>> For atomic color management get_gamma won't be accurate at all if mixed with new color management.
> Hm, it's just some safety code I found laying around, and figured that
> looks like a good idea. You think it's worth it with some improved commit
> message added?
Might as well. It makes gamma_get ioctl slightly more reliable, but for reliable gamma should probably use crtc properties or atomic. :)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2016-05-31 13:30 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30  9:51 [PATCH 00/10] legacy gamma code cleanup Daniel Vetter
2016-03-30  9:51 ` [PATCH 01/10] drm: Initialize a linear gamma table by default Daniel Vetter
2016-05-31 13:05   ` Maarten Lankhorst
2016-05-31 13:24     ` Daniel Vetter
2016-05-31 13:30       ` Maarten Lankhorst
2016-03-30  9:51 ` [PATCH 02/10] drm/fb-helper: Remove dead code in setcolreg Daniel Vetter
2016-05-31 13:09   ` Maarten Lankhorst
2016-05-31 13:25     ` Daniel Vetter
2016-03-30  9:51 ` [PATCH 03/10] drm/armada: Drop fb gamma_set/get functions Daniel Vetter
2016-03-30 11:09   ` Russell King - ARM Linux
2016-03-30 11:19     ` Daniel Vetter
2016-03-30 12:56       ` Russell King - ARM Linux
2016-03-30 15:29         ` Daniel Vetter
2016-03-30  9:51 ` [PATCH 04/10] drm/bochs: Drop fake gamma support Daniel Vetter
2016-04-01  8:37   ` Gerd Hoffmann
2016-03-30  9:51 ` [PATCH 05/10] drm/cirrus: Drop redundnant gamma size check Daniel Vetter
2016-05-31 13:11   ` Maarten Lankhorst
2016-03-30  9:51 ` [PATCH 06/10] drm/msm: Nuke dummy gamma_set/get functions Daniel Vetter
2016-05-31 13:18   ` Maarten Lankhorst
2016-03-30  9:51 ` [PATCH 07/10] drm/virtio: Drop dummy gamma table support Daniel Vetter
2016-04-01  8:38   ` Gerd Hoffmann
2016-04-12 11:14     ` Daniel Vetter
2016-04-12 13:58   ` Emil Velikov
2016-04-12 14:27     ` Julia Lawall
2016-03-30  9:51 ` [PATCH 08/10] drm/imx: Don't set a gamma table size Daniel Vetter
2016-03-30 13:36   ` Philipp Zabel
2016-03-30  9:51 ` [PATCH 09/10] drm/qxl: " Daniel Vetter
2016-05-31 13:17   ` Maarten Lankhorst
2016-05-31 13:27     ` Daniel Vetter
2016-03-30  9:51 ` [PATCH 10/10] drm/tegra: " Daniel Vetter
2016-03-30 12:39   ` Thierry Reding
2016-03-30 15:31     ` Daniel Vetter
2016-03-31 10:33   ` Thierry Reding
2016-03-31  7:15 ` ✗ Fi.CI.BAT: failure for legacy gamma code cleanup Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.