diff mbox

drm/i915: Propagate invalid setcrtc cloning errors back to userspace

Message ID 1416247168-28702-1-git-send-email-matthew.d.roper@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matt Roper Nov. 17, 2014, 5:59 p.m. UTC
When invalid cloning configurations were detected during modeset, we
never copied the error code into the return value variable, leading us
to return 0 (success) to userspace.

Testcase: igt/kms_setmode
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ville Syrjälä Nov. 17, 2014, 6:47 p.m. UTC | #1
On Mon, Nov 17, 2014 at 09:59:28AM -0800, Matt Roper wrote:
> When invalid cloning configurations were detected during modeset, we
> never copied the error code into the return value variable, leading us
> to return 0 (success) to userspace.
> 
> Testcase: igt/kms_setmode
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index dda97b3..cf57b74 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11477,6 +11477,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
>  						   &prepare_pipes,
>  						   &disable_pipes);
>  	if (IS_ERR(pipe_config)) {
> +		ret = PTR_ERR(pipe_config);
>  		goto fail;
>  	} else if (pipe_config) {
>  		if (to_intel_crtc(set->crtc)->new_config->has_audio !=

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Hmm. Unless I'm mistaken the problem appeared in

commit 50f5275698df4490046cc5b4ed2018abb642a803
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Nov 7 13:11:00 2014 -0800

    drm/i915: use compute_config in set_config v4

> -- 
> 1.8.5.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter Nov. 17, 2014, 7:06 p.m. UTC | #2
On Mon, Nov 17, 2014 at 09:59:28AM -0800, Matt Roper wrote:
> When invalid cloning configurations were detected during modeset, we
> never copied the error code into the return value variable, leading us
> to return 0 (success) to userspace.
> 
> Testcase: igt/kms_setmode
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

I guess this is a regression from 

commit 50f5275698df4490046cc5b4ed2018abb642a803
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Nov 7 13:11:00 2014 -0800

    drm/i915: use compute_config in set_config v4

Is this the one we have a bugzilla for already? Jesse?
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index dda97b3..cf57b74 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11477,6 +11477,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
>  						   &prepare_pipes,
>  						   &disable_pipes);
>  	if (IS_ERR(pipe_config)) {
> +		ret = PTR_ERR(pipe_config);
>  		goto fail;
>  	} else if (pipe_config) {
>  		if (to_intel_crtc(set->crtc)->new_config->has_audio !=
> -- 
> 1.8.5.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Matt Roper Nov. 17, 2014, 7:17 p.m. UTC | #3
On Mon, Nov 17, 2014 at 08:06:47PM +0100, Daniel Vetter wrote:
> On Mon, Nov 17, 2014 at 09:59:28AM -0800, Matt Roper wrote:
> > When invalid cloning configurations were detected during modeset, we
> > never copied the error code into the return value variable, leading us
> > to return 0 (success) to userspace.
> > 
> > Testcase: igt/kms_setmode
> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> 
> I guess this is a regression from 
> 
> commit 50f5275698df4490046cc5b4ed2018abb642a803
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Fri Nov 7 13:11:00 2014 -0800
> 
>     drm/i915: use compute_config in set_config v4
> 
> Is this the one we have a bugzilla for already? Jesse?
> -Daniel

Looks like it might be this one:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86226


Matt

> 
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index dda97b3..cf57b74 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -11477,6 +11477,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
> >  						   &prepare_pipes,
> >  						   &disable_pipes);
> >  	if (IS_ERR(pipe_config)) {
> > +		ret = PTR_ERR(pipe_config);
> >  		goto fail;
> >  	} else if (pipe_config) {
> >  		if (to_intel_crtc(set->crtc)->new_config->has_audio !=
> > -- 
> > 1.8.5.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Jesse Barnes Nov. 17, 2014, 8:10 p.m. UTC | #4
On Mon, 17 Nov 2014 11:17:22 -0800
Matt Roper <matthew.d.roper@intel.com> wrote:

> On Mon, Nov 17, 2014 at 08:06:47PM +0100, Daniel Vetter wrote:
> > On Mon, Nov 17, 2014 at 09:59:28AM -0800, Matt Roper wrote:
> > > When invalid cloning configurations were detected during modeset, we
> > > never copied the error code into the return value variable, leading us
> > > to return 0 (success) to userspace.
> > > 
> > > Testcase: igt/kms_setmode
> > > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> > 
> > I guess this is a regression from 
> > 
> > commit 50f5275698df4490046cc5b4ed2018abb642a803
> > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Date:   Fri Nov 7 13:11:00 2014 -0800
> > 
> >     drm/i915: use compute_config in set_config v4
> > 
> > Is this the one we have a bugzilla for already? Jesse?
> > -Daniel
> 
> Looks like it might be this one:
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86226

Ah you found it already?  Nice.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Daniel Vetter Nov. 17, 2014, 8:22 p.m. UTC | #5
On Mon, Nov 17, 2014 at 12:10:25PM -0800, Jesse Barnes wrote:
> On Mon, 17 Nov 2014 11:17:22 -0800
> Matt Roper <matthew.d.roper@intel.com> wrote:
> 
> > On Mon, Nov 17, 2014 at 08:06:47PM +0100, Daniel Vetter wrote:
> > > On Mon, Nov 17, 2014 at 09:59:28AM -0800, Matt Roper wrote:
> > > > When invalid cloning configurations were detected during modeset, we
> > > > never copied the error code into the return value variable, leading us
> > > > to return 0 (success) to userspace.
> > > > 
> > > > Testcase: igt/kms_setmode
> > > > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> > > 
> > > I guess this is a regression from 
> > > 
> > > commit 50f5275698df4490046cc5b4ed2018abb642a803
> > > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > > Date:   Fri Nov 7 13:11:00 2014 -0800
> > > 
> > >     drm/i915: use compute_config in set_config v4
> > > 
> > > Is this the one we have a bugzilla for already? Jesse?
> > > -Daniel
> > 
> > Looks like it might be this one:
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86226
> 
> Ah you found it already?  Nice.
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Queued for -next, thanks for the patch.
-Daniel
Shuang He Nov. 18, 2014, 1:19 a.m. UTC | #6
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate
BYT: pass/total=290/291->291/291
PNV: pass/total=356/356->356/356
ILK: pass/total=371/372->372/372
IVB: pass/total=545/546->546/546
SNB: pass/total=424/425->425/425
HSW: pass/total=579/579->579/579
BDW: pass/total=432/435->433/435
-------------------------------------Detailed-------------------------------------
test_platform: test_suite, test_case, result_with_drm_intel_nightly(count, machine_id...)...->result_with_patch_applied(count, machine_id)...
BYT: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(1, M36)PASS(3, M36) -> TIMEOUT(3, M36)PASS(1, M36)
ILK: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(1, M37)PASS(3, M37) -> TIMEOUT(3, M37)PASS(1, M37)
IVB: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(1, M21)PASS(3, M34) -> TIMEOUT(3, M34)PASS(1, M34)
SNB: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(1, M35)PASS(3, M35) -> TIMEOUT(3, M35)PASS(1, M35)
BDW: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(1, M28)PASS(3, M28) -> TIMEOUT(3, M28)PASS(1, M28)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dda97b3..cf57b74 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11477,6 +11477,7 @@  static int intel_crtc_set_config(struct drm_mode_set *set)
 						   &prepare_pipes,
 						   &disable_pipes);
 	if (IS_ERR(pipe_config)) {
+		ret = PTR_ERR(pipe_config);
 		goto fail;
 	} else if (pipe_config) {
 		if (to_intel_crtc(set->crtc)->new_config->has_audio !=