diff mbox

[RFC,10/18] drm/i915: Initializing DRRS for all connectors

Message ID 1435326722-24633-11-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C June 26, 2015, 1:51 p.m. UTC
For all the connectors drrs init is invoked. drrs_init will
initialize the drrs for those connectors that support DRRS.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Daniel Vetter June 26, 2015, 5:12 p.m. UTC | #1
On Fri, Jun 26, 2015 at 07:21:54PM +0530, Ramalingam C wrote:
> For all the connectors drrs init is invoked. drrs_init will
> initialize the drrs for those connectors that support DRRS.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3f48917..0e8467c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15021,6 +15021,7 @@ void intel_modeset_init(struct drm_device *dev)
>  	int sprite, ret;
>  	enum pipe pipe;
>  	struct intel_crtc *crtc;
> +	struct intel_connector *connector;
>  
>  	drm_mode_config_init(dev);
>  
> @@ -15090,6 +15091,10 @@ void intel_modeset_init(struct drm_device *dev)
>  	i915_disable_vga(dev);
>  	intel_setup_outputs(dev);
>  
> +	list_for_each_entry(connector, &dev->mode_config.connector_list,
> +								base.head)
> +		intel_drrs_init(dev, connector, connector->panel.fixed_mode);

We initialize all the panel stuff in respective encoder callbacks, this is
a layering violation. If we need to share more panel init code then that's
ok, but the call needs to be in the edp/dsi/lvds/whatever init functions.
-Daniel

> +
>  	/* Just in case the BIOS is doing something questionable. */
>  	intel_fbc_disable(dev);
>  
> -- 
> 1.7.9.5
>
Ramalingam C June 29, 2015, 2:52 p.m. UTC | #2
On Friday 26 June 2015 10:42 PM, Daniel Vetter wrote:
> On Fri, Jun 26, 2015 at 07:21:54PM +0530, Ramalingam C wrote:
>> For all the connectors drrs init is invoked. drrs_init will
>> initialize the drrs for those connectors that support DRRS.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_display.c |    5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 3f48917..0e8467c 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -15021,6 +15021,7 @@ void intel_modeset_init(struct drm_device *dev)
>>   	int sprite, ret;
>>   	enum pipe pipe;
>>   	struct intel_crtc *crtc;
>> +	struct intel_connector *connector;
>>   
>>   	drm_mode_config_init(dev);
>>   
>> @@ -15090,6 +15091,10 @@ void intel_modeset_init(struct drm_device *dev)
>>   	i915_disable_vga(dev);
>>   	intel_setup_outputs(dev);
>>   
>> +	list_for_each_entry(connector, &dev->mode_config.connector_list,
>> +								base.head)
>> +		intel_drrs_init(dev, connector, connector->panel.fixed_mode);
> We initialize all the panel stuff in respective encoder callbacks, this is
> a layering violation. If we need to share more panel init code then that's
> ok, but the call needs to be in the edp/dsi/lvds/whatever init functions.
> -Daniel
Ok. Thought of making it generic connector property by calling the 
drrs_init for all
connector and  by validating the supported encoders at drrs_init. But I 
think we can move this call to
the corresponding encoder(dsi/eDP) init calls too. Will work on that. 
Thanks.

>
>> +
>>   	/* Just in case the BIOS is doing something questionable. */
>>   	intel_fbc_disable(dev);
>>   
>> -- 
>> 1.7.9.5
>>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3f48917..0e8467c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15021,6 +15021,7 @@  void intel_modeset_init(struct drm_device *dev)
 	int sprite, ret;
 	enum pipe pipe;
 	struct intel_crtc *crtc;
+	struct intel_connector *connector;
 
 	drm_mode_config_init(dev);
 
@@ -15090,6 +15091,10 @@  void intel_modeset_init(struct drm_device *dev)
 	i915_disable_vga(dev);
 	intel_setup_outputs(dev);
 
+	list_for_each_entry(connector, &dev->mode_config.connector_list,
+								base.head)
+		intel_drrs_init(dev, connector, connector->panel.fixed_mode);
+
 	/* Just in case the BIOS is doing something questionable. */
 	intel_fbc_disable(dev);