drm/i915/skl: Correctly updating sprite wm parameter
Subsystems (2)
PATCH 1/1 drm/i915/skl: Correctly updating sprite wm parameter
From: Sonika Jindal <[email protected]>
The pipe wm parameters is not correctly updated with sprite parameters because it copies them for each plane from plane_list to the sprite offset in pipe wm parameters. Since plane_list also contains primary and cursor planes, we end up updating wrong params for sprites.
--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -3301,7 +3301,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,list_for_each_entry (plane, &dev->mode_config.plane_list, head) {struct intel_plane *intel_plane =to_intel_plane (plane); -if (intel_plane->pipe == pipe) +if (intel_plane->pipe == pipe && + plane->type ==DRM_PLANE_TYPE_OVERLAY ) p->plane[i++] = intel_plane->wm; } }
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · On Tue, Dec 09, 2014 at 10:59:15AM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
The pipe wm parameters is not correctly updated with sprite parameters because it copies them for each plane from
plane_listto the sprite offset in pipe wm parameters. Sinceplane_listalso contains primary and cursor planes, we end up updating wrong params for sprites.Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, · line 3308
Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1@@ -3301,7 +3301,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,list_for_each_entry (plane, &dev->mode_config.plane_list, head) {struct intel_plane *intel_plane =to_intel_plane (plane); -if (intel_plane->pipe == pipe) +if (intel_plane->pipe == pipe && + plane->type ==DRM_PLANE_TYPE_OVERLAY ) p->plane[i++] = intel_plane->wm; } }
With the great unification of planes both in hw with skl+ and in software (with Matt's recent work): Can't we just ditch the cursor/primary plane special 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
Yes, that can be done but that might involve more changes and testing. I am not sure who can signup for this, I can check with people though. But for now to fix the sprite plane wm this check would be required.
Regards,
Sonika
-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Tuesday, December 9, 2014 3:57 PM
To: Jindal, Sonika
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915/skl: Correctly updating sprite wm parameter
Quoted 17 lines · On Tue, Dec 09, 2014 at 10:59:15AM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
The pipe wm parameters is not correctly updated with sprite parameters because it copies them for each plane from
plane_listto the sprite offset in pipe wm parameters. Sinceplane_listalso contains primary and cursor planes, we end up updating wrong params for sprites.Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_pm.cindex 8d182a6..4a16f9b 100644
drivers/gpu/drm/i915/intel_pm.c static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, · line 3308
Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1@@ -3301,7 +3301,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,list_for_each_entry (plane, &dev->mode_config.plane_list, head) {struct intel_plane *intel_plane =to_intel_plane (plane); -if (intel_plane->pipe == pipe) +if (intel_plane->pipe == pipe && + plane->type ==DRM_PLANE_TYPE_OVERLAY ) p->plane[i++] = intel_plane->wm; } }
With the great unification of planes both in hw with skl+ and in software (with Matt's recent work): Can't we just ditch the cursor/primary plane special cases? -Daniel
--
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 364/364 364/364
ILK +3-4 362/366 361/366
SNB 448/450 448/450 IVB 497/498 497/498 BYT 289/289 289/289 HSW 563/564 563/564 BDW 417/417 417/417 -------------------------------------Detailed------------------------------------- Platform Test drm-intel-nightly Series Applied ILK igt_kms_flip_nonblocking-read DMESG_WARN(1, M26)PASS(3, M26M37) PASS(1, M26) ILK igt_kms_setmode_invalid-clone-exclusive-crtc DMESG_WARN(1, M26)PASS(3, M26M37) PASS(1, M26) *ILK igt_kms_flip_busy-flip-interruptible PASS(2, M26) DMESG_WARN(1, M26) *ILK igt_kms_flip_flip-vs-dpms-interruptible PASS(2, M26) DMESG_WARN(1, M26) *ILK igt_kms_flip_flip-vs-panning PASS(2, M26) DMESG_WARN(1, M26) ILK igt_kms_flip_flip-vs-rmfb-interruptible DMESG_WARN(1, M26)PASS(3, M26M37) PASS(1, M26) *ILK igt_kms_flip_wf_vblank-ts-check PASS(2, M26) NSPT(1, M26)
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 18 lines · On 12/09/2014 05:29 AM, [email protected] wrote:
From: Sonika Jindal <[email protected]>
The pipe wm parameters is not correctly updated with sprite parameters because it copies them for each plane from
plane_listto the sprite offset in pipe wm parameters. Sinceplane_listalso contains primary and cursor planes, we end up updating wrong params for sprites.Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, · line 3308
Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1@@ -3301,7 +3301,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,list_for_each_entry (plane, &dev->mode_config.plane_list, head) {struct intel_plane *intel_plane =to_intel_plane (plane); -if (intel_plane->pipe == pipe) +if (intel_plane->pipe == pipe && + plane->type ==DRM_PLANE_TYPE_OVERLAY ) p->plane[i++] = intel_plane->wm; } }
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 22 lines · Tvrtko Ursulin
Quoted 20 lines · On 12/09/2014 05:29 AM, [email protected] wrote:
From: Sonika Jindal <[email protected]>
The pipe wm parameters is not correctly updated with sprite parameters because it copies them for each plane from
plane_listto the sprite offset in pipe wm parameters. Sinceplane_listalso contains primary and cursor planes, we end up updating wrong params for sprites.Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +0
-0@@ -3301,7 +3301,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,list_for_each_entry (plane, &dev->mode_config.plane_list, head) {struct intel_plane *intel_plane =to_intel_plane (plane);
Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, · line 3308
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1-if (intel_plane->pipe == pipe) +if (intel_plane->pipe == pipe && + plane->type ==DRM_PLANE_TYPE_OVERLAY ) p->plane[i++] = intel_plane->wm; } }Reviewed-by Tvrtko Ursulin <[email protected]>
Queued for -next, thanks for the patch.
-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