Skip to contentSkip to conversation

drm/i915: enable IPS for bpp <= 24

PATCH Applied Jesse Barnes 4 participants 6 messages Jul 25, 2013 – Aug 5, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: enable IPS for bpp <= 24

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 12ea1a9..7cf475b 100644
@@ -4091,7 +4091,7 @@ static void hsw_compute_ips_config(struct intel_crtc *crtc,
 {
 	pipe_config->ips_enabled = i915_enable_ips &&
 				   hsw_crtc_supports_ips(crtc) &&
-				   pipe_config->pipe_bpp == 24;
+				   pipe_config->pipe_bpp <= 24;
 }
 
 static int intel_crtc_compute_config(struct intel_crtc *crtc,
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 14 lines · Jesse Barnes

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 12ea1a9..7cf475b 100644

drivers/gpu/drm/i915/intel_display.c static void hsw_compute_ips_config(struct intel_crtc *crtc, · line 4094

Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -4091,7 +4091,7 @@ static void hsw_compute_ips_config(struct intel_crtc *crtc,
 {
 	pipe_config->ips_enabled = i915_enable_ips &&
 				   hsw_crtc_supports_ips(crtc) &&
-				   pipe_config->pipe_bpp == 24;
+				   pipe_config->pipe_bpp <= 24;

Don't you want to check that the incoming fb is depth 24? -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#2 lore raw
Quoted 10 lines · On Thu, 25 Jul 2013 18:17:59 +0100 Chris Wilson <[email protected]>…
Quoted 9 lines · Jesse Barnes

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

drivers/gpu/drm/i915/intel_display.c static void hsw_compute_ips_config(struct intel_crtc *crtc, · line 4094

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
index 12ea1a9..7cf475b 100644
@@ -4091,7 +4091,7 @@ static void hsw_compute_ips_config(struct intel_crtc *crtc,
 {
 	pipe_config->ips_enabled = i915_enable_ips &&
 				   hsw_crtc_supports_ips(crtc) &&
-				   pipe_config->pipe_bpp == 24;
+				   pipe_config->pipe_bpp <= 24;

Don't you want to check that the incoming fb is depth 24?

I think this field will have the right bits in it for a 12bpc HDMI config for example, so we should be able to use it for IPS support.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#3 lore raw
Quoted 26 lines · Jesse Barnes
Quoted 10 lines · On Thu, 25 Jul 2013 18:17:59 +0100 Chris Wilson <[email protected]>…
Quoted 9 lines · Jesse Barnes

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

drivers/gpu/drm/i915/intel_display.c static void hsw_compute_ips_config(struct intel_crtc *crtc, · line 4094

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
index 12ea1a9..7cf475b 100644
@@ -4091,7 +4091,7 @@ static void hsw_compute_ips_config(struct intel_crtc *crtc,
 {
    pipe_config->ips_enabled = i915_enable_ips &&
                               hsw_crtc_supports_ips(crtc) &&
-                              pipe_config->pipe_bpp == 24;
+                              pipe_config->pipe_bpp <= 24;

Don't you want to check that the incoming fb is depth 24?

Quoted 2 lines

I think this field will have the right bits in it for a 12bpc HDMI config for example, so we should be able to use it for IPS support.

Atm the above should work, but I expect that longer-term we need to track sprite/plane configuration bits (like the watermark stuff maybe), too. Only HDMI rounds up from the fb bpp value, but it doesn't round up 8bpc to 12bpc. This might change eventually when we get around to implement the high-precision gamma tables, since with a 10bpc display it would make sense to have the higher precision even with a 24bpp scanout buffer.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Reviewed-by on v1 1/1
#4 lore raw
In reply to Jesse Barnes

2013/7/25 Jesse Barnes <[email protected]>:

Quoted 4 lines

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

I previously said I tested this in the past and it didn't work. So today I tested it again and I discovered that the problem is that if I configure X to use DefaultDepth 16, my eDP monitor won't work *at all*, even with IPS disabled. Everything else seems to work.

Sorry for the wrong information.

Quoted 25 lines
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
index 12ea1a9..7cf475b 100644
@@ -4091,7 +4091,7 @@ static void hsw_compute_ips_config(struct intel_crtc *crtc,
 {
        pipe_config->ips_enabled = i915_enable_ips &&
                                   hsw_crtc_supports_ips(crtc) &&
-                                  pipe_config->pipe_bpp == 24;
+                                  pipe_config->pipe_bpp <= 24;
 }
 
 static int intel_crtc_compute_config(struct intel_crtc *crtc,
--

1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
#5 lore raw
Quoted 6 lines · Paulo Zanoni

2013/7/25 Jesse Barnes <[email protected]>:

Quoted 4 lines

Art confirms that this should work fine. Since most panels are 18bpp with dithering from 24bpp, the existing code wouldn't be enabled in most cases.

Quoted 6 lines

I previously said I tested this in the past and it didn't work. So today I tested it again and I discovered that the problem is that if I configure X to use DefaultDepth 16, my eDP monitor won't work *at all*, even with IPS disabled. Everything else seems to work.

Sorry for the wrong information.

I guess this is another case of

https://bugzilla.kernel.org/show_bug.cgi?id=59841

Care to test the attached patch there?

Quoted 1 line

Merged, thanks for the patch&review.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch