diff mbox

[02/13] drm/i915/skl: Make sure to break when not finding suitable PLL dividers

Message ID 1431020329-11414-3-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien May 7, 2015, 5:38 p.m. UTC
Right now, when finishing the cycle with odd dividers without finding a
suitable candidate, we end up in an infinite loop. Make sure to break in
that case.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Paulo Zanoni May 27, 2015, 5:58 p.m. UTC | #1
2015-05-07 14:38 GMT-03:00 Damien Lespiau <damien.lespiau@intel.com>:
> Right now, when finishing the cycle with odd dividers without finding a
> suitable candidate, we end up in an infinite loop. Make sure to break in
> that case.

Cc stable?

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 2e24fa4..da7aa0f 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1180,6 +1180,10 @@ found:
>                 }
>
>                 if (min_dco_index > 2 && dco_count == 2) {
> +                        /* oh well, we tried... */
> +                        if (retry_with_odd)
> +                                break;
> +
>                         retry_with_odd = true;
>                         dco_count = 0;
>                 }
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula May 28, 2015, 6:31 a.m. UTC | #2
On Wed, 27 May 2015, Paulo Zanoni <przanoni@gmail.com> wrote:
> 2015-05-07 14:38 GMT-03:00 Damien Lespiau <damien.lespiau@intel.com>:
>> Right now, when finishing the cycle with odd dividers without finding a
>> suitable candidate, we end up in an infinite loop. Make sure to break in
>> that case.
>
> Cc stable?

No, fixes for platforms that require the preliminary_hw_support flag are
neither for stable nor the current development kernel.

BR,
Jani.


>
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
>>
>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
>> index 2e24fa4..da7aa0f 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -1180,6 +1180,10 @@ found:
>>                 }
>>
>>                 if (min_dco_index > 2 && dco_count == 2) {
>> +                        /* oh well, we tried... */
>> +                        if (retry_with_odd)
>> +                                break;
>> +
>>                         retry_with_odd = true;
>>                         dco_count = 0;
>>                 }
>> --
>> 2.1.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> -- 
> Paulo Zanoni
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter May 28, 2015, 7:45 a.m. UTC | #3
On Thu, May 07, 2015 at 06:38:38PM +0100, Damien Lespiau wrote:
> Right now, when finishing the cycle with odd dividers without finding a
> suitable candidate, we end up in an infinite loop. Make sure to break in
> that case.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 2e24fa4..da7aa0f 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1180,6 +1180,10 @@ found:
>  		}
>  
>  		if (min_dco_index > 2 && dco_count == 2) {
> +                        /* oh well, we tried... */
> +                        if (retry_with_odd)
> +                                break;

Shouldn't we have a return value somewhere here and then indicate to
userspace that things seriously went wrong? The error code handling is
almost there already to pass it all back up to haswell_crtc_compute_clock.
-Daniel

> +
>  			retry_with_odd = true;
>  			dco_count = 0;
>  		}
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Paulo Zanoni May 28, 2015, 1:59 p.m. UTC | #4
2015-05-28 4:45 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
> On Thu, May 07, 2015 at 06:38:38PM +0100, Damien Lespiau wrote:
>> Right now, when finishing the cycle with odd dividers without finding a
>> suitable candidate, we end up in an infinite loop. Make sure to break in
>> that case.
>>
>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
>> index 2e24fa4..da7aa0f 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -1180,6 +1180,10 @@ found:
>>               }
>>
>>               if (min_dco_index > 2 && dco_count == 2) {
>> +                        /* oh well, we tried... */
>> +                        if (retry_with_odd)
>> +                                break;
>
> Shouldn't we have a return value somewhere here and then indicate to
> userspace that things seriously went wrong? The error code handling is
> almost there already to pass it all back up to haswell_crtc_compute_clock.

I guess you want what's on patch 4?

> -Daniel
>
>> +
>>                       retry_with_odd = true;
>>                       dco_count = 0;
>>               }
>> --
>> 2.1.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 2e24fa4..da7aa0f 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1180,6 +1180,10 @@  found:
 		}
 
 		if (min_dco_index > 2 && dco_count == 2) {
+                        /* oh well, we tried... */
+                        if (retry_with_odd)
+                                break;
+
 			retry_with_odd = true;
 			dco_count = 0;
 		}