[Intel-gfx] [PATCH 2/2] drm/i915: Only enabled DRRS if PRS won't be enabled on this pipe.
Ramalingam C
ramalingam.c at intel.com
Thu Mar 26 07:39:11 PDT 2015
On Wednesday 25 March 2015 09:11 PM, Vivi, Rodrigo wrote:
> On Wed, 2015-03-25 at 16:08 +0530, Ramalingam C wrote:
>> On Wednesday 25 March 2015 12:42 AM, Rodrigo Vivi wrote:
>>> With PSR enabled being pre computed on pipe_config we can now
>>> prevent DRRS to be enabled along with PSR.
>>>
>>> Cc: Ramalingam C <ramalingam.c at intel.com>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
>>> ---
>>> drivers/gpu/drm/i915/intel_dp.c | 10 +++++-----
>>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>>> index 637dd53..af28833 100644
>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>> @@ -4992,11 +4992,6 @@ static void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate)
>>> return;
>>> }
>>>
>>> - /*
>>> - * FIXME: This needs proper synchronization with psr state for some
>>> - * platforms that cannot have PSR and DRRS enabled at the same time.
>>> - */
>>> -
>>> dig_port = dp_to_dig_port(intel_dp);
>>> encoder = &dig_port->base;
>>> intel_crtc = encoder->new_crtc;
>>> @@ -5082,6 +5077,11 @@ void intel_edp_drrs_enable(struct intel_dp *intel_dp)
>>> return;
>>> }
>>>
>>> + if (intel_crtc->config->psr_enabled) {
>>> + DRM_DEBUG_KMS("DRRS: PSR enabled on this crtc\n");
>>> + return;
>>> + }
>>> +
>> But you might want to explicitly disable the DRRS when PSR is supported.
>> Because incase DRRS is enabled before PSR,
>> then blocking the enable call wont help us to stop DRRS.
>> In fact I would have suggested to place this in DRRS init path. But a
>> feature called media playback DRRS(in RFC stage)
>> needs DRRS active even when PSR is enabled/supported. So dont want to
>> block the DRRS init path because PSR is supported.
>> Disabling alone will be sufficient.
>>
>> So as soon as PSR support is detected you would like to explicitly
>> disable the DRRS(if it is supported)
>> along with blocking further drrs_enable calls.
> Not actually. Please take a look on the other patch on this series.
> If possible please review both.
>
> intel_crtc->config->psr_enabled is pre-computed and comes before DRRS
> enabling. So with this pre-computed psr enable flag we don't need to
> switch other states because DRRS won't be enabled never.
Thanks for the explanation. Gone through the previous patch in this
series. As this flag psr_enabled is
getting computed well before the PSR and DRRS enable, then this patch
will be sufficient to
disable the DRRS.
>
>>> mutex_lock(&dev_priv->drrs.mutex);
>>> if (WARN_ON(dev_priv->drrs.dp)) {
>>> DRM_ERROR("DRRS already enabled\n");
Thanks,
--Ram
More information about the Intel-gfx
mailing list