Re: [PATCH 07/10] drm/i915: Remove crtc->config dereferences in intel_modeset_setup_hw_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 11-10-18 om 13:59 schreef Ville Syrjälä:
> On Thu, Oct 11, 2018 at 12:04:54PM +0200, Maarten Lankhorst wrote:
>> The CRTC is idle at this point, so we can dereference crtc->state safely.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
>> ---
>>  drivers/gpu/drm/i915/intel_display.c | 11 +++++++----
>>  1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 19d7714df021..cbe70bc4d02d 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -15934,6 +15934,7 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>>  {
>>  	struct drm_i915_private *dev_priv = to_i915(dev);
>>  	struct intel_crtc *crtc;
>> +	struct intel_crtc_state *crtc_state;
> Can be moved into narrower scope.
2 places use it, the power domains and the dump_pipe_config, because of this
I kept it as top scope. :)

Thanks, pushed patch 2-9. Hoping to get a reviewer for 1, and will resubmit 10/10 with
a patch doing the proposed intel_wait_for_vblank_if_active() changes.

>>  	struct intel_encoder *encoder;
>>  	int i;
>>  
>> @@ -15952,7 +15953,7 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
>>  		drm_crtc_vblank_reset(&crtc->base);
>>  
>> -		if (crtc->active)
>> +		if (crtc->base.state->active)
>>  			drm_crtc_vblank_on(&crtc->base);
>>  	}
>>  
>> @@ -15961,9 +15962,10 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>>  	for_each_intel_encoder(dev, encoder)
>>  		intel_sanitize_encoder(encoder);
>>  
>> -	for_each_intel_crtc(&dev_priv->drm, crtc) {
>> +	for_each_intel_crtc(dev, crtc) {
> I'd keep the dev_priv->drm, because we should just change the function
> to take the dev_priv directly.
>
> Apart from those
> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux