diff mbox

[01/16] drm: fixes crct set_mode when crtc mode_fixup is null.

Message ID 9d41105dee6632b4bb50e9555f2196ac249b9fce.1455630967.git.palminha@synopsys.com (mailing list archive)
State New, archived
Headers show

Commit Message

Carlos Palminha Feb. 16, 2016, 2:10 p.m. UTC
This patch set nukes all the dummy crtc mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Daniel Vetter Feb. 16, 2016, 2:37 p.m. UTC | #1
On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:
> This patch set nukes all the dummy crtc mode_fixup implementations.
> (made on top of Daniel topic/drm-misc branch)
> 
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>

Applied this one to drm-misc. I'll let the others hang out there for a bit
more to collect acks.

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index e70d064..7539eea 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>  		}
>  	}
>  
> -	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> -		DRM_DEBUG_KMS("CRTC fixup failed\n");
> -		goto done;
> +	if (crtc_funcs->mode_fixup) {
> +		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> +						adjusted_mode))) {
> +			DRM_DEBUG_KMS("CRTC fixup failed\n");
> +			goto done;
> +		}
>  	}
>  	DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>  
> -- 
> 2.5.0
>
Carlos Palminha Feb. 16, 2016, 3:24 p.m. UTC | #2
Thanks!

On 16-02-2016 14:37, Daniel Vetter wrote:
> On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:
>> This patch set nukes all the dummy crtc mode_fixup implementations.
>> (made on top of Daniel topic/drm-misc branch)
>>
>> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> 
> Applied this one to drm-misc. I'll let the others hang out there for a bit
> more to collect acks.
> 
> Thanks, Daniel
> 
>> ---
>>  drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
>> index e70d064..7539eea 100644
>> --- a/drivers/gpu/drm/drm_crtc_helper.c
>> +++ b/drivers/gpu/drm/drm_crtc_helper.c
>> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>>  		}
>>  	}
>>  
>> -	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
>> -		DRM_DEBUG_KMS("CRTC fixup failed\n");
>> -		goto done;
>> +	if (crtc_funcs->mode_fixup) {
>> +		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
>> +						adjusted_mode))) {
>> +			DRM_DEBUG_KMS("CRTC fixup failed\n");
>> +			goto done;
>> +		}
>>  	}
>>  	DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>>  
>> -- 
>> 2.5.0
>>
>
Sergei Shtylyov Feb. 16, 2016, 5:37 p.m. UTC | #3
Hello.

On 02/16/2016 05:10 PM, Carlos Palminha wrote:

> This patch set nukes all the dummy crtc mode_fixup implementations.
> (made on top of Daniel topic/drm-misc branch)
>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> ---
>   drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index e70d064..7539eea 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>   		}
>   	}
>
> -	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> -		DRM_DEBUG_KMS("CRTC fixup failed\n");
> -		goto done;
> +	if (crtc_funcs->mode_fixup) {
> +		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> +						adjusted_mode))) {

    You haven't run the patch thru scripts/checkpatch.pl, have you? :-)
(It curses on assignment inside the *if* expression.)

[...]

MBR, Sergei
Daniel Vetter Feb. 16, 2016, 7:39 p.m. UTC | #4
On Tue, Feb 16, 2016 at 08:37:29PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 02/16/2016 05:10 PM, Carlos Palminha wrote:
> 
> >This patch set nukes all the dummy crtc mode_fixup implementations.
> >(made on top of Daniel topic/drm-misc branch)
> >
> >Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> >---
> >  drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> >index e70d064..7539eea 100644
> >--- a/drivers/gpu/drm/drm_crtc_helper.c
> >+++ b/drivers/gpu/drm/drm_crtc_helper.c
> >@@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
> >  		}
> >  	}
> >
> >-	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> >-		DRM_DEBUG_KMS("CRTC fixup failed\n");
> >-		goto done;
> >+	if (crtc_funcs->mode_fixup) {
> >+		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
> >+						adjusted_mode))) {
> 
>    You haven't run the patch thru scripts/checkpatch.pl, have you? :-)
> (It curses on assignment inside the *if* expression.)

pre-existing, so checkpatch.pl doesn't get a vote ;-)
-Daniel
Carlos Palminha March 4, 2016, 10:14 a.m. UTC | #5
On 16-02-2016 14:37, Daniel Vetter wrote:
> On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:
>> This patch set nukes all the dummy crtc mode_fixup implementations.
>> (made on top of Daniel topic/drm-misc branch)
>>
>> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> 
> Applied this one to drm-misc. I'll let the others hang out there for a bit
> more to collect acks.

It seems that we are not getting more ACKs.
How can we push this forward?

> 
> Thanks, Daniel
> 
>> ---
>>  drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
>> index e70d064..7539eea 100644
>> --- a/drivers/gpu/drm/drm_crtc_helper.c
>> +++ b/drivers/gpu/drm/drm_crtc_helper.c
>> @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>>  		}
>>  	}
>>  
>> -	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
>> -		DRM_DEBUG_KMS("CRTC fixup failed\n");
>> -		goto done;
>> +	if (crtc_funcs->mode_fixup) {
>> +		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
>> +						adjusted_mode))) {
>> +			DRM_DEBUG_KMS("CRTC fixup failed\n");
>> +			goto done;
>> +		}
>>  	}
>>  	DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>>  
>> -- 
>> 2.5.0
>>
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index e70d064..7539eea 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -343,9 +343,12 @@  bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
 		}
 	}
 
-	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
-		DRM_DEBUG_KMS("CRTC fixup failed\n");
-		goto done;
+	if (crtc_funcs->mode_fixup) {
+		if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
+						adjusted_mode))) {
+			DRM_DEBUG_KMS("CRTC fixup failed\n");
+			goto done;
+		}
 	}
 	DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);