drm/i915: Initialize primary plane src/dst coords when reading hw state
Subsystems (2)
PATCH 1/1 drm/i915: Initialize primary plane src/dst coords when reading hw state
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a 0x0 initial value.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/i915/intel_display.c +19 -0
@@ -13322,6 +13322,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct intel_plane *primary =to_intel_plane (crtc->base.primary); + +if (!crtc->primary_enabled) +return ; + + primary->crtc_x =0 ; + primary->crtc_y =0 ; + primary->crtc_w = crtc->config.pipe_src_w; + primary->crtc_h = crtc->config.pipe_src_h; + primary->src_x =0 ; + primary->src_y =0 ; + primary->src_w = crtc->config.pipe_src_w <<16 ; + primary->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -13332,6 +13349,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;
@@ -13341,6 +13359,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc); DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>
I guess long term we need to consolidate all our plane state related readout functions, atm it's splattered all over. But that's maybe something for after all the atomic work has stablized a bit. -Daniel
Quoted 55 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +19
-1@@ -13322,6 +13322,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct intel_plane *primary =to_intel_plane (crtc->base.primary); + +if (!crtc->primary_enabled) +return ; + + primary->crtc_x =0 ; + primary->crtc_y =0 ; + primary->crtc_w = crtc->config.pipe_src_w; + primary->crtc_h = crtc->config.pipe_src_h; + primary->src_x =0 ; + primary->src_y =0 ; + primary->src_w = crtc->config.pipe_src_w <<16 ; + primary->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;@@ -13332,6 +13349,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13341,6 +13359,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc); DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id, --1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Daniel Vetter
Quoted 6 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>
Quoted 5 lines
Reviewed-by Daniel Vetter <[email protected]>I guess long term we need to consolidate all our plane state related readout functions, atm it's splattered all over. But that's maybe something for after all the atomic work has stablized a bit.
We would also need to consider the user requested vs. current state issue during resume. If someone suspends with a bunch of planes enabled we should restore them during resume rather than overwrite the user requested state with the current hardware state.
So the patch isn't entirely correct in that sense, but given that we overwrite these values again based on the crtc->x/y and crtc->mode when we restore the mode, so it should come out ok in this case. I suppose we don't yet track the current vs. user state sufficiently to do things in an entirely correct way.
Quoted 66 lines
-Daniel
Quoted 55 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +19
-1@@ -13322,6 +13322,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct intel_plane *primary =to_intel_plane (crtc->base.primary); + +if (!crtc->primary_enabled) +return ; + + primary->crtc_x =0 ; + primary->crtc_y =0 ; + primary->crtc_w = crtc->config.pipe_src_w; + primary->crtc_h = crtc->config.pipe_src_h; + primary->src_x =0 ; + primary->src_y =0 ; + primary->src_w = crtc->config.pipe_src_w <<16 ; + primary->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;@@ -13332,6 +13349,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13341,6 +13359,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc); DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id, --1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Ville Syrjälä
Quoted 8 lines · Daniel Vetter
Quoted 6 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>Quoted 5 lines
Reviewed-by Daniel Vetter <[email protected]>I guess long term we need to consolidate all our plane state related readout functions, atm it's splattered all over. But that's maybe something for after all the atomic work has stablized a bit.
We would also need to consider the user requested vs. current state issue during resume. If someone suspends with a bunch of planes enabled we should restore them during resume rather than overwrite the user requested state with the current hardware state.
Quoted 5 lines
So the patch isn't entirely correct in that sense, but given that we overwrite these values again based on the crtc->x/y and
crtc->modewhen we restore the mode, so it should come out ok in this case. I suppose we don't yet track the current vs. user state sufficiently to do things in an entirely correct way.
Hm right I've missed that interaction completely. Do we have a testcase which sets the primary planes to a specified place, does a suspend/resume and then checks the placement with CRCs? Might need to do a full pass over all the crc plane (primary, cursor, sprite) we have already and make sure we have subtests against suspend for all interesting cases. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 kms_plane: Add test that suspends/resumes before getting crc
This adds a test that does a suspend/resume cycle between configuring a plane and getting the crc value for the pipe. The intention is to test if the user requested stated is restored properly, instead of being clobbered by the state read out from the hardware.
--- tests/kms_plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
tests/kms_plane.c +12 -0
@@ -32,6 +32,7 @@#include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" +#include "igt_aux.h" typedef struct { float red;
@@ -269,6 +270,7 @@ create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,enum {TEST_PANNING_TOP_LEFT =1 <<0 ,TEST_PANNING_BOTTOM_RIGHT =1 <<1 , +TEST_SUSPEND_RESUME =1 <<2 , }; static void
@@ -309,8 +311,13 @@ test_plane_panning_with_output(data_t *data,igt_display_commit (&data->display); +if (flags &TEST_SUSPEND_RESUME ) +igt_system_suspend_autoresume (); +igt_pipe_crc_collect_crc (data->pipe_crc, &crc); +igt_debug_wait_for_keypress ("crc" ); +if (flags &TEST_PANNING_TOP_LEFT )igt_assert (igt_crc_equal (&test.red_crc, &crc));else
@@ -360,6 +367,11 @@ run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane)test_plane_panning (data, pipe, plane,TEST_PANNING_BOTTOM_RIGHT ); +igt_subtest_f ("plane-panning-bottom-right-suspend-pipe-%s-plane-%d" , + kmstest_pipe_name(pipe), plane) +test_plane_panning (data, pipe, plane, +TEST_PANNING_BOTTOM_RIGHT | +TEST_SUSPEND_RESUME ); } static void
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH i-g-t] kms_plane: Add test that suspends/resumes before getting crc
Quoted 6 lines · Ander Conselvan de Oliveira
This adds a test that does a suspend/resume cycle between configuring a plane and getting the crc value for the pipe. The intention is to test if the user requested stated is restored properly, instead of being clobbered by the state read out from the hardware.
Signed-off-by Ander Conselvan de Oliveira <[email protected]>
Applied, thanks for the patch.
-Daniel
Quoted 53 lines
--- tests/kms_plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)tests/kms_plane.c +12
-0@@ -32,6 +32,7 @@#include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" +#include "igt_aux.h" typedef struct { float red;@@ -269,6 +270,7 @@ create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,enum {TEST_PANNING_TOP_LEFT =1 <<0 ,TEST_PANNING_BOTTOM_RIGHT =1 <<1 , +TEST_SUSPEND_RESUME =1 <<2 , }; static void@@ -309,8 +311,13 @@ test_plane_panning_with_output(data_t *data,igt_display_commit (&data->display); +if (flags &TEST_SUSPEND_RESUME ) +igt_system_suspend_autoresume (); +igt_pipe_crc_collect_crc (data->pipe_crc, &crc); +igt_debug_wait_for_keypress ("crc" ); +if (flags &TEST_PANNING_TOP_LEFT )igt_assert (igt_crc_equal (&test.red_crc, &crc));else @@ -360,6 +367,11 @@ run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane)test_plane_panning (data, pipe, plane,TEST_PANNING_BOTTOM_RIGHT ); +igt_subtest_f ("plane-panning-bottom-right-suspend-pipe-%s-plane-%d" , + kmstest_pipe_name(pipe), plane) +test_plane_panning (data, pipe, plane, +TEST_PANNING_BOTTOM_RIGHT | +TEST_SUSPEND_RESUME ); } static voidSignature · 1 line
1.9.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 354/354 353/354
ILK 201/201 201/201
SNB +1-1 401/424 401/424
IVB -2 488/488 486/488
BYT 278/278 278/278 HSW -42 529/529 487/529 BDW -1 405/405 404/405 -------------------------------------Detailed------------------------------------- Platform Test drm-intel-nightly Series Applied *PNV igt_gem_concurrent_blit_cpu-rcs-overwrite-source-interruptible PASS(2, M7) NO_RESULT(1, M7) SNB igt_kms_flip_flip-vs-dpms-off-vs-modeset-interruptible NSPT(1, M35)PASS(6, M35M22) PASS(1, M35) *SNB igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible PASS(7, M35M22) DMESG_WARN(1, M35) *IVB igt_kms_plane_plane-panning-top-left-pipe-C-plane-2 PASS(2, M21M4) DMESG_WARN(1, M4) *IVB igt_kms_plane_plane-position-hole-pipe-C-plane-1 PASS(2, M21M4) DMESG_WARN(1, M4) HSW igt_kms_cursor_crc_cursor-size-change NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_fence_pin_leak NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_flip_event_leak NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_mmio_vs_cs_flip_setcrtc_vs_cs_flip NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_lpsp_non-edp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_cursor NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_cursor-dpms NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_dpms-mode-unset-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_dpms-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_drm-resources-equal NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_fences NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_fences-dpms NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-execbuf NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-mmap-cpu NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-mmap-gtt NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-pread NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_i2c NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_modeset-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_modeset-non-lpsp-stress-no-wait NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_pci-d3-state NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_rte NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-early-read-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-early-read-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-gpu-read-after-write-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) *HSW igt_gem_concurrent_blit_gttX-bcs-early-read-interruptible DMESG_WARN(2, M40)PASS(2, M20M19) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-overwrite-source-interruptible DMESG_WARN(2, M40M19)PASS(1, M20) DMESG_WARN(1, M19) *BDW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible PASS(6, M30M28) DMESG_WARN(1, M30)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerAnder, please see if these results make sense.
BR,
Jani.
Quoted 65 lines · On Tue, 13 Jan 2015, [email protected] wrote:
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 354/354 353/354
ILK 201/201 201/201
SNB +1-1 401/424 401/424
IVB -2 488/488 486/488BYT 278/278 278/278 HSW -42 529/529 487/529 BDW -1 405/405 404/405 -------------------------------------Detailed------------------------------------- Platform Test drm-intel-nightly Series Applied *PNV igt_gem_concurrent_blit_cpu-rcs-overwrite-source-interruptible PASS(2, M7) NO_RESULT(1, M7) SNB igt_kms_flip_flip-vs-dpms-off-vs-modeset-interruptible NSPT(1, M35)PASS(6, M35M22) PASS(1, M35) *SNB igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible PASS(7, M35M22) DMESG_WARN(1, M35) *IVB igt_kms_plane_plane-panning-top-left-pipe-C-plane-2 PASS(2, M21M4) DMESG_WARN(1, M4) *IVB igt_kms_plane_plane-position-hole-pipe-C-plane-1 PASS(2, M21M4) DMESG_WARN(1, M4) HSW igt_kms_cursor_crc_cursor-size-change NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_fence_pin_leak NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_flip_event_leak NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_mmio_vs_cs_flip_setcrtc_vs_cs_flip NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_lpsp_non-edp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_cursor NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_cursor-dpms NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_dpms-mode-unset-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_dpms-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_drm-resources-equal NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_fences NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_fences-dpms NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-execbuf NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-mmap-cpu NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-mmap-gtt NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_gem-pread NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_i2c NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_modeset-non-lpsp NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_modeset-non-lpsp-stress-no-wait NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_pci-d3-state NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_pm_rpm_rte NSPT(3, M40M19)PASS(1, M20) NSPT(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-early-read-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-bcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-early-read-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-gpu-read-after-write-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gtt-rcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) *HSW igt_gem_concurrent_blit_gttX-bcs-early-read-interruptible DMESG_WARN(2, M40)PASS(2, M20M19) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-bcs-overwrite-source-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-early-read-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-gpu-read-after-write-interruptible DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-overwrite-source-forked DMESG_WARN(3, M40M19)PASS(1, M20) DMESG_WARN(1, M19) HSW igt_gem_concurrent_blit_gttX-rcs-overwrite-source-interruptible DMESG_WARN(2, M40M19)PASS(1, M20) DMESG_WARN(1, M19) *BDW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible PASS(6, M30M28) DMESG_WARN(1, M30)Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Jani Nikula
Ander, please see if these results make sense.
BR,
Jani.Quoted 13 lines · On Tue, 13 Jan 2015, [email protected] wrote:
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 354/354 353/354
ILK 201/201 201/201
SNB +1-1 401/424 401/424
IVB -2 488/488 486/488BYT 278/278 278/278 HSW -42 529/529 487/529BDW -1 405/405 404/405
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt_gem_concurrent_blit_cpu-rcs-overwrite-source-interruptiblePASS(2, M7)NO_RESULT(1, M7)
I'm not sure of what to make out of NO_RESULT.
Quoted 1 line
Quoted 1 line
*SNB igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible
PASS(7, M35M22)DMESG_WARN(1, M35)
PRTS doesn't seem to have saved the dmesg for this one.
Quoted 1 line
Quoted 1 line
*IVB igt_kms_plane_plane-panning-top-left-pipe-C-plane-2
PASS(2, M21M4)DMESG_WARN(1, M4)
<3>[ 8370.823428] [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder C
Quoted 1 line
Quoted 1 line
*IVB igt_kms_plane_plane-position-hole-pipe-C-plane-1
PASS(2, M21M4)DMESG_WARN(1, M4)
<3>[ 8417.687721] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.694032] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.700334] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.706640] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.712947] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.719256] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.727057] [drm:intel_dp_complete_link_train [i915]] *ERROR* failed to train DP, aborting
Quoted 1 line
Quoted 1 line
*HSW igt_gem_concurrent_blit_gttX-bcs-early-read-interruptible
DMESG_WARN(2, M40)PASS(2, M20M19)DMESG_WARN(1, M19)
It seems PRTS also forgot to save the dmesg for this one.
Quoted 1 line
Quoted 1 line
*BDW igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible
PASS(6, M30M28)DMESG_WARN(1, M30)
<3>[ 7724.684295] [drm:hsw_unclaimed_reg_detect.isra.10 [i915]] *ERROR* Unclaimed register detected. Please use the i915.mmio_debug=1 to debug this problem.gem_concurrent_blit: starting subtest gtt-bcs-gpu-read-after-write-interruptible
Are any of those known issues?
Thanks,
Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 33 lines
-----Original Message-----
From: Ander Conselvan de Oliveira [mailto:[email protected]]
Sent: Tuesday, January 13, 2015 4:34 PM
To: Jani Nikula; He, Shuang; Gao, Ethan; [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Initialize primary plane src/dst coords when reading hw stateQuoted 8 lines · Jani Nikula
Ander, please see if these results make sense.
BR,
Jani.Quoted 1 line · On Tue, 13 Jan 2015, [email protected] wrote:
Tested-by PRC QA PRTS (Patch Regression Test System Contact:Quoted 2 lines
Quoted 2 lines
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly SeriesApplied
Quoted 1 line
Quoted 1 line
PNV -1 354/354
353/354
Quoted 1 line
Quoted 1 line
ILK 201/201
201/201
Quoted 1 line
Quoted 1 line
SNB +1-1 401/424
401/424
Quoted 1 line
Quoted 1 line
IVB -2 488/488
486/488
Quoted 1 line
Quoted 1 line
BYT 278/278
278/278
Quoted 1 line
Quoted 1 line
HSW -42 529/529
487/529
Quoted 1 line
Quoted 1 line
BDW -1 405/405
Quoted 8 lines
404/405
Quoted 2 lines
Quoted 2 lines
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightlySeries Applied
Quoted 1 line
Quoted 1 line
*PNV igt_gem_concurrent_blit_cpu-rcs-overwrite-source-interruptible
PASS(2, M7)NO_RESULT(1, M7)I'm not sure of what to make out of
NO_RESULT.
[He, Shuang] It means, we have tried to run it, but it didn't return any testing result (there are many possibility in this case: Test machine hung, for example)
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
*SNB igt_gem_concurrent_blit_gtt-rcs-early-read-interruptible
PASS(7, M35M22)DMESG_WARN(1, M35)
[He, Shuang] Please use the one in *.out section which is recorded by piglit itself "igt/gem_concurrent_blit/gtt-rcs-early-read-interruptible": {
"dmesg": "[ 7857.565015] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11
[ 7861.527641] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11 [ 7895.526741] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11 [ 7897.526694] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11",
"returncode": 0,
Quoted 25 lines
PRTS doesn't seem to have saved the dmesg for this one.
Quoted 1 line
Quoted 1 line
*IVB igt_kms_plane_plane-panning-top-left-pipe-C-plane-2 PASS(2,
M21M4)
DMESG_WARN(1, M4)<3>[ 8370.823428] [drm:intel_set_pch_fifo_underrun_reporting [i915]]*ERROR* uncleared pch fifo underrun on pch transcoder C
Quoted 1 line
Quoted 1 line
*IVB igt_kms_plane_plane-position-hole-pipe-C-plane-1 PASS(2,
M21M4)
DMESG_WARN(1, M4)<3>[ 8417.687721] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.694032] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.700334] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.706640] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.712947] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.719256] [drm:intel_dp_start_link_train [i915]] *ERROR* too many voltage retries, give up <3>[ 8417.727057] [drm:intel_dp_complete_link_train [i915]] *ERROR* failed
Quoted 6 lines
to train DP, aborting
Quoted 1 line
Quoted 1 line
*HSW igt_gem_concurrent_blit_gttX-bcs-early-read-interruptible
DMESG_WARN(2, M40)PASS(2, M20M19)DMESG_WARN(1, M19)It seems PRTS also forgot to save the dmesg for this one.
[He, Shuang] "igt/gem_concurrent_blit/gttX-bcs-early-read-interruptible": {
"dmesg": "[ 8127.156781] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11
[ 8135.168107] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11 [ 8149.163954] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11 [ 8151.178758] pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x1bc [i915] returns -11",
Thanks
--Shuang
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
*BDW
igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-interruptible
PASS(6, M30M28)DMESG_WARN(1, M30)<3>[ 7724.684295] [drm:hsw_unclaimed_reg_detect.isra.10 [i915]] *ERROR*
Quoted 8 lines
Unclaimed register detected. Please use the i915.mmio_debug=1 to debug this problem.gem_concurrent_blit: starting subtest gtt-bcs-gpu-read-after-write-interruptible
Are any of those known issues?
Thanks,
Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915: Initialize primary plane src/dst coords when reading hw state
In reply to Ander Conselvan de OliveiraOtherwise setting the rotation property will cause the primary plane to be disabled, caused by having a 0x0 initial value.
v2: Rebase on top of the move to plane helpers.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/i915/intel_display.c +19 -0
@@ -13327,6 +13327,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct drm_plane_state *state = crtc->base.primary->state; + +if (!crtc->primary_enabled) +return ; + + state->crtc_x =0 ; + state->crtc_y =0 ; + state->crtc_w = crtc->config.pipe_src_w; + state->crtc_h = crtc->config.pipe_src_h; + state->src_x =0 ; + state->src_y =0 ; + state->src_w = crtc->config.pipe_src_w <<16 ; + state->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -13337,6 +13354,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;
@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc); DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 5604 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 353/353 353/353 ILK 353/353 353/353 SNB 400/422 400/422 IVB 487/487 487/487 BYT 296/296 296/296 HSW +21 487/508 508/508 BDW 401/402 401/402 -------------------------------------Detailed------------------------------------- Platform Test drm-intel-nightly Series Applied HSW igt_kms_cursor_crc_cursor-size-change NSPT(1, M19)TIMEOUT(1, M40)PASS(7, M20M19M40) PASS(1, M20) HSW igt_kms_fence_pin_leak NSPT(1, M19)DMESG_WARN(1, M40)PASS(7, M20M19M40) PASS(1, M20) HSW igt_kms_mmio_vs_cs_flip_setcrtc_vs_cs_flip NSPT(1, M19)TIMEOUT(1, M40)PASS(7, M20M19M40) PASS(1, M20) HSW igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip NSPT(1, M19)TIMEOUT(1, M40)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_lpsp_non-edp NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_cursor NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_cursor-dpms NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_dpms-mode-unset-non-lpsp NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_dpms-non-lpsp NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_drm-resources-equal NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_fences NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_fences-dpms NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_gem-execbuf NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_gem-mmap-cpu NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_gem-mmap-gtt NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_gem-pread NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_i2c NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_modeset-non-lpsp NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_modeset-non-lpsp-stress-no-wait NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_pci-d3-state NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20) HSW igt_pm_rpm_rte NSPT(1, M19)PASS(7, M20M19M40) PASS(1, M20)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.v2: Rebase on top of the move to plane helpers.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>
Testcase: igt/ksm_plane/*-suspend-*
Quoted 33 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +17
-0@@ -13327,6 +13327,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct drm_plane_state *state = crtc->base.primary->state; + +if (!crtc->primary_enabled) +return ; + + state->crtc_x =0 ; + state->crtc_y =0 ; + state->crtc_w = crtc->config.pipe_src_w; + state->crtc_h = crtc->config.pipe_src_h; + state->src_x =0 ; + state->src_y =0 ; + state->src_w = crtc->config.pipe_src_w <<16 ; + state->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13357
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13337,6 +13354,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +
Spurious hunk.
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13367
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1
-0memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc);
I think Ville raised a really good point about the fragility of this and restoring plane state correctly. I think conceptually it makes more sense to restore the primary plane state together with the fb in the loop at the end of intel_modeset_init. Would that still work, or is that too late for when we change pipe state when sanititizing crtcs?
-Daniel
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +0
-0DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,Signature · 1 line
1.9.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 57 lines · Daniel Vetter
Quoted 8 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.v2: Rebase on top of the move to plane helpers.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>Testcase: igt/ksm_plane/*-suspend-*
Quoted 33 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +17
-0@@ -13327,6 +13327,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct drm_plane_state *state = crtc->base.primary->state; + +if (!crtc->primary_enabled) +return ; + + state->crtc_x =0 ; + state->crtc_y =0 ; + state->crtc_w = crtc->config.pipe_src_w; + state->crtc_h = crtc->config.pipe_src_h; + state->src_x =0 ; + state->src_y =0 ; + state->src_w = crtc->config.pipe_src_w <<16 ; + state->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13357
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13337,6 +13354,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +Spurious hunk.
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +0
-0memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13367
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1
-0crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc);I think Ville raised a really good point about the fragility of this and restoring plane state correctly. I think conceptually it makes more sense to restore the primary plane state together with the fb in the loop at the end of
intel_modeset_init. Would that still work, or is that too late for when we change pipe state when sanititizing crtcs?
That should work. Actually, Chris sent a patch that did that some time ago, and Ville commented that "[he was] thinking that for now these would be better placed in intel_modeset_readout_hw_state() where we read out the primary plane enabled state as well". [1]
So just to make it complete clear, does the problem of restoring plane state correctly supersedes Ville's previous comment?
[1] http://permalink.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/46466
Ander
Quoted 9 lines
-Daniel
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +0
-1DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id, --1.9.1
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Quoted 57 lines · Daniel Vetter
Quoted 8 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.v2: Rebase on top of the move to plane helpers.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>Testcase: igt/ksm_plane/*-suspend-*
Quoted 33 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +17
-0@@ -13327,6 +13327,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct drm_plane_state *state = crtc->base.primary->state; + +if (!crtc->primary_enabled) +return ; + + state->crtc_x =0 ; + state->crtc_y =0 ; + state->crtc_w = crtc->config.pipe_src_w; + state->crtc_h = crtc->config.pipe_src_h; + state->src_x =0 ; + state->src_y =0 ; + state->src_w = crtc->config.pipe_src_w <<16 ; + state->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13357
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13337,6 +13354,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +Spurious hunk.
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +0
-0memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13367
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1
-0crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc);I think Ville raised a really good point about the fragility of this and restoring plane state correctly. I think conceptually it makes more sense to restore the primary plane state together with the fb in the loop at the end of
intel_modeset_init. Would that still work, or is that too late for when we change pipe state when sanititizing crtcs?
That should work. Actually, Chris sent a patch that did that some time ago, and Ville commented that "[he was] thinking that for now these would be better placed in intel_modeset_readout_hw_state() where we read out the primary plane enabled state as well". [1]
So just to make it completely clear, does the problem of restoring plane state correctly supersedes Ville's previous comment?
[1] http://permalink.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/46466
Ander
Quoted 9 lines
-Daniel
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +0
-1DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id, --1.9.1
Quoted 68 lines · Ander Conselvan de Oliveira
Quoted 57 lines · Daniel Vetter
Quoted 8 lines · Ander Conselvan de Oliveira
Otherwise setting the rotation property will cause the primary plane to be disabled, caused by having a
0x0initial value.v2: Rebase on top of the move to plane helpers.
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87662Signed-off-by Ander Conselvan de Oliveira <[email protected]>Testcase: igt/ksm_plane/*-suspend-*
Quoted 33 lines
--- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/i915/intel_display.c +17
-0@@ -13327,6 +13327,23 @@ static bool primary_get_hw_state(struct intel_crtc *crtc)return I915_READ (DSPCNTR (crtc->plane)) &DISPLAY_PLANE_ENABLE ; } +static void primary_update_size (struct intel_crtc *crtc) +{ +struct drm_plane_state *state = crtc->base.primary->state; + +if (!crtc->primary_enabled) +return ; + + state->crtc_x =0 ; + state->crtc_y =0 ; + state->crtc_w = crtc->config.pipe_src_w; + state->crtc_h = crtc->config.pipe_src_h; + state->src_x =0 ; + state->src_y =0 ; + state->src_w = crtc->config.pipe_src_w <<16 ; + state->src_h = crtc->config.pipe_src_h <<16 ; +} +static void intel_modeset_readout_hw_state (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13357
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13337,6 +13354,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)int i;for_each_intel_crtc (dev, crtc) { +Spurious hunk.
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +0
-0memset (&crtc->config,0 ,sizeof (crtc->config)); crtc->config.quirks |=PIPE_CONFIG_QUIRK_INHERITED_MODE ;@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13367
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1
-0crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc);I think Ville raised a really good point about the fragility of this and restoring plane state correctly. I think conceptually it makes more sense to restore the primary plane state together with the fb in the loop at the end of
intel_modeset_init. Would that still work, or is that too late for when we change pipe state when sanititizing crtcs?
Quoted 7 lines
That should work. Actually, Chris sent a patch that did that some time ago, and Ville commented that "[he was] thinking that for now these would be better placed in
intel_modeset_readout_hw_state()where we read out the primary plane enabled state as well". [1]So just to make it completely clear, does the problem of restoring plane state correctly supersedes Ville's previous comment?
Well, I still think intel_modeset_readout_hw_state() is the right place for this. We would just need to keep the user state and current state clearly separated (intel_modeset_readout_hw_state() should not touch the user state). But if that's too hard to do without massive changes, maybe we can put it somewhere else in the meantime.
Quoted 16 lines
[1]
http://permalink.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/46466Ander
Quoted 9 lines
-Daniel
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +0
-1DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id, --1.9.1
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Ville Syrjälä
Quoted 19 lines · Ander Conselvan de Oliveira
Quoted 12 lines · Daniel Vetter
drivers/gpu/drm/i915/intel_display.c static void intel_modeset_readout_hw_state(struct drm_device *dev) · line 13367
Quoted 5 lines · Ander Conselvan de Oliveira
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13346,6 +13364,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.enabled = crtc->active; crtc->primary_enabled =primary_get_hw_state (crtc); +primary_update_size (crtc);I think Ville raised a really good point about the fragility of this and restoring plane state correctly. I think conceptually it makes more sense to restore the primary plane state together with the fb in the loop at the end of
intel_modeset_init. Would that still work, or is that too late for when we change pipe state when sanititizing crtcs?That should work. Actually, Chris sent a patch that did that some time ago, and Ville commented that "[he was] thinking that for now these would be better placed in
intel_modeset_readout_hw_state()where we read out the primary plane enabled state as well". [1]
Quoted 8 lines
Quoted 2 lines
So just to make it completely clear, does the problem of restoring plane state correctly supersedes Ville's previous comment?
Well, I still think
intel_modeset_readout_hw_state()is the right place for this. We would just need to keep the user state and current state clearly separated (intel_modeset_readout_hw_state()should not touch the user state). But if that's too hard to do without massive changes, maybe we can put it somewhere else in the meantime.
Well most of the plane state readout for the initial config (which this seems to be a problem with) isn't in that function but in modeset_init. And we currently have no means to check the requested vs the actual state for the plane configuration.
Thinking about that we probably don't need that really: The reason for the modeset config checks is to catch bugs with requested vs. actual state, since we can't test anything really automatically. But with plane config changes we can do full functional tests using display CRCs. So from that pov I don't see a big reason to add all that complexity.
Long term we should try to consolidate the plane state readout a bit (outside of readout_hw_state perhaps), but for now just adding the code in the modeset_init loop seems best to me.
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
[1]
http://permalink.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/46466
In short I disagree with your comment referenced above. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx