diff mbox

[1/1] drm/i915/cnl: Extend HDMI 2.0 support to CNL.

Message ID 20171110222626.27212-2-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Vivi Nov. 10, 2017, 10:26 p.m. UTC
Starting on GLK we support HDMI 2.0. So this patch only
extend the work Shashank has made to GLK to CNL.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Navare, Manasi Nov. 10, 2017, 11:50 p.m. UTC | #1
Looks good.
But are these the only places that need change to support 2.0?
Dont we need any changes in voltage swing programming or DDI clocks?

Manasi`

On Fri, Nov 10, 2017 at 02:26:26PM -0800, Rodrigo Vivi wrote:
> Starting on GLK we support HDMI 2.0. So this patch only
> extend the work Shashank has made to GLK to CNL.
> 
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 2d95db64cdf2..1b22b587e98c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
>  		&dev_priv->vbt.ddi_port_info[encoder->port];
>  	int max_tmds_clock;
>  
> -	if (IS_GEMINILAKE(dev_priv))
> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>  		max_tmds_clock = 594000;
>  	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
>  		max_tmds_clock = 300000;
> @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>  
>  	pipe_config->lane_count = 4;
>  
> -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> +					   INTEL_GEN(dev_priv) >= 10) {
>  		if (scdc->scrambling.low_rates)
>  			pipe_config->hdmi_scrambling = true;
>  
> @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>  	connector->doublescan_allowed = 0;
>  	connector->stereo_allowed = 1;
>  
> -	if (IS_GEMINILAKE(dev_priv))
> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>  		connector->ycbcr_420_allowed = true;
>  
>  	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> -- 
> 2.13.6
>
Rodrigo Vivi Nov. 11, 2017, 12:04 a.m. UTC | #2
On Fri, Nov 10, 2017 at 11:50:21PM +0000, Manasi Navare wrote:
> Looks good.
> But are these the only places that need change to support 2.0?
> Dont we need any changes in voltage swing programming or DDI clocks?

not that I'm aware of... but that would explain the blank screens...

> 
> Manasi`
> 
> On Fri, Nov 10, 2017 at 02:26:26PM -0800, Rodrigo Vivi wrote:
> > Starting on GLK we support HDMI 2.0. So this patch only
> > extend the work Shashank has made to GLK to CNL.
> > 
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 2d95db64cdf2..1b22b587e98c 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
> >  		&dev_priv->vbt.ddi_port_info[encoder->port];
> >  	int max_tmds_clock;
> >  
> > -	if (IS_GEMINILAKE(dev_priv))
> > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> >  		max_tmds_clock = 594000;
> >  	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
> >  		max_tmds_clock = 300000;
> > @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
> >  
> >  	pipe_config->lane_count = 4;
> >  
> > -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> > +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> > +					   INTEL_GEN(dev_priv) >= 10) {
> >  		if (scdc->scrambling.low_rates)
> >  			pipe_config->hdmi_scrambling = true;
> >  
> > @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
> >  	connector->doublescan_allowed = 0;
> >  	connector->stereo_allowed = 1;
> >  
> > -	if (IS_GEMINILAKE(dev_priv))
> > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> >  		connector->ycbcr_420_allowed = true;
> >  
> >  	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> > -- 
> > 2.13.6
> >
Sharma, Shashank Nov. 11, 2017, 9:43 a.m. UTC | #3
Regards

Shashank


On 11/11/2017 3:56 AM, Rodrigo Vivi wrote:
> Starting on GLK we support HDMI 2.0. So this patch only
> extend the work Shashank has made to GLK to CNL.
>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 2d95db64cdf2..1b22b587e98c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
>   		&dev_priv->vbt.ddi_port_info[encoder->port];
>   	int max_tmds_clock;
>   
> -	if (IS_GEMINILAKE(dev_priv))
> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
Would it be a good idea to create a new macro called 
IS_HDMI2_SUPPORTED() or a function is_hdmi2_supported() where we keep 
all the GEN check ?
>   		max_tmds_clock = 594000;
>   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
>   		max_tmds_clock = 300000;
> @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>   
>   	pipe_config->lane_count = 4;
>   
> -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> +					   INTEL_GEN(dev_priv) >= 10) {
>   		if (scdc->scrambling.low_rates)
>   			pipe_config->hdmi_scrambling = true;
>   
> @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>   	connector->doublescan_allowed = 0;
>   	connector->stereo_allowed = 1;
>   
> -	if (IS_GEMINILAKE(dev_priv))
> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>   		connector->ycbcr_420_allowed = true;
Looks good otherwise.
- Shashank
>   
>   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
Sharma, Shashank Nov. 11, 2017, 9:47 a.m. UTC | #4
I am still waiting for the dmesg logs, Rodrigo :P

I am pretty sure that you would have picked up if there is a general 
problem, wit the modeset or HDMI.

I just want to check what is following from the mode and monitor 
combination during blankout:

- is the mode YCBCR420 ?

- is scrambling enabled ?

- does the monitor supports 4k@60 RGB (594Mhz) or its 4k@60 YCBCR420 
(300Mhz)

- are we in 12 BPC deep color mode ?
- is this a CEA 4k@60 mode, or other one ?

Regards
Shashank
On 11/11/2017 5:34 AM, Rodrigo Vivi wrote:
> On Fri, Nov 10, 2017 at 11:50:21PM +0000, Manasi Navare wrote:
>> Looks good.
>> But are these the only places that need change to support 2.0?
>> Dont we need any changes in voltage swing programming or DDI clocks?
> not that I'm aware of... but that would explain the blank screens...
>
>> Manasi`
>>
>> On Fri, Nov 10, 2017 at 02:26:26PM -0800, Rodrigo Vivi wrote:
>>> Starting on GLK we support HDMI 2.0. So this patch only
>>> extend the work Shashank has made to GLK to CNL.
>>>
>>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>>> Cc: Shashank Sharma <shashank.sharma@intel.com>
>>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
>>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>>> index 2d95db64cdf2..1b22b587e98c 100644
>>> --- a/drivers/gpu/drm/i915/intel_hdmi.c
>>> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>>> @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
>>>   		&dev_priv->vbt.ddi_port_info[encoder->port];
>>>   	int max_tmds_clock;
>>>   
>>> -	if (IS_GEMINILAKE(dev_priv))
>>> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>>>   		max_tmds_clock = 594000;
>>>   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
>>>   		max_tmds_clock = 300000;
>>> @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>>>   
>>>   	pipe_config->lane_count = 4;
>>>   
>>> -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
>>> +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
>>> +					   INTEL_GEN(dev_priv) >= 10) {
>>>   		if (scdc->scrambling.low_rates)
>>>   			pipe_config->hdmi_scrambling = true;
>>>   
>>> @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>>>   	connector->doublescan_allowed = 0;
>>>   	connector->stereo_allowed = 1;
>>>   
>>> -	if (IS_GEMINILAKE(dev_priv))
>>> +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>>>   		connector->ycbcr_420_allowed = true;
>>>   
>>>   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
>>> -- 
>>> 2.13.6
>>>
Rodrigo Vivi Nov. 13, 2017, 6:46 p.m. UTC | #5
On Sat, Nov 11, 2017 at 09:47:40AM +0000, Sharma, Shashank wrote:
> I am still waiting for the dmesg logs, Rodrigo :P
> 
> I am pretty sure that you would have picked up if there is a general
> problem, wit the modeset or HDMI.

yep... my bad... sorry...
We will provide that soon.

> 
> I just want to check what is following from the mode and monitor combination
> during blankout:
> 
> - is the mode YCBCR420 ?
> 
> - is scrambling enabled ?
> 
> - does the monitor supports 4k@60 RGB (594Mhz) or its 4k@60 YCBCR420
> (300Mhz)
> 
> - are we in 12 BPC deep color mode ?
> - is this a CEA 4k@60 mode, or other one ?
> 
> Regards
> Shashank
> On 11/11/2017 5:34 AM, Rodrigo Vivi wrote:
> > On Fri, Nov 10, 2017 at 11:50:21PM +0000, Manasi Navare wrote:
> > > Looks good.
> > > But are these the only places that need change to support 2.0?
> > > Dont we need any changes in voltage swing programming or DDI clocks?
> > not that I'm aware of... but that would explain the blank screens...
> > 
> > > Manasi`
> > > 
> > > On Fri, Nov 10, 2017 at 02:26:26PM -0800, Rodrigo Vivi wrote:
> > > > Starting on GLK we support HDMI 2.0. So this patch only
> > > > extend the work Shashank has made to GLK to CNL.
> > > > 
> > > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > ---
> > > >   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
> > > >   1 file changed, 4 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > index 2d95db64cdf2..1b22b587e98c 100644
> > > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
> > > >   		&dev_priv->vbt.ddi_port_info[encoder->port];
> > > >   	int max_tmds_clock;
> > > > -	if (IS_GEMINILAKE(dev_priv))
> > > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> > > >   		max_tmds_clock = 594000;
> > > >   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
> > > >   		max_tmds_clock = 300000;
> > > > @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
> > > >   	pipe_config->lane_count = 4;
> > > > -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> > > > +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> > > > +					   INTEL_GEN(dev_priv) >= 10) {
> > > >   		if (scdc->scrambling.low_rates)
> > > >   			pipe_config->hdmi_scrambling = true;
> > > > @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
> > > >   	connector->doublescan_allowed = 0;
> > > >   	connector->stereo_allowed = 1;
> > > > -	if (IS_GEMINILAKE(dev_priv))
> > > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> > > >   		connector->ycbcr_420_allowed = true;
> > > >   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> > > > -- 
> > > > 2.13.6
> > > > 
>
Rodrigo Vivi Nov. 13, 2017, 6:47 p.m. UTC | #6
On Sat, Nov 11, 2017 at 09:43:44AM +0000, Sharma, Shashank wrote:
> Regards
> 
> Shashank
> 
> 
> On 11/11/2017 3:56 AM, Rodrigo Vivi wrote:
> > Starting on GLK we support HDMI 2.0. So this patch only
> > extend the work Shashank has made to GLK to CNL.
> > 
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
> >   1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 2d95db64cdf2..1b22b587e98c 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
> >   		&dev_priv->vbt.ddi_port_info[encoder->port];
> >   	int max_tmds_clock;
> > -	if (IS_GEMINILAKE(dev_priv))
> > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> Would it be a good idea to create a new macro called IS_HDMI2_SUPPORTED() or
> a function is_hdmi2_supported() where we keep all the GEN check ?

I asked myself the same question.
I believe a IS_HDMI2_SUPPORTED or HAS_HDMI2_SUPPORT is a good idea...

> >   		max_tmds_clock = 594000;
> >   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
> >   		max_tmds_clock = 300000;
> > @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
> >   	pipe_config->lane_count = 4;
> > -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> > +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> > +					   INTEL_GEN(dev_priv) >= 10) {
> >   		if (scdc->scrambling.low_rates)
> >   			pipe_config->hdmi_scrambling = true;
> > @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
> >   	connector->doublescan_allowed = 0;
> >   	connector->stereo_allowed = 1;
> > -	if (IS_GEMINILAKE(dev_priv))
> > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> >   		connector->ycbcr_420_allowed = true;
> Looks good otherwise.
> - Shashank
> >   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
>
David Weinehall Nov. 15, 2017, 7:05 p.m. UTC | #7
On Mon, Nov 13, 2017 at 10:47:44AM -0800, Rodrigo Vivi wrote:
> On Sat, Nov 11, 2017 at 09:43:44AM +0000, Sharma, Shashank wrote:
> > Regards
> > 
> > Shashank
> > 
> > 
> > On 11/11/2017 3:56 AM, Rodrigo Vivi wrote:
> > > Starting on GLK we support HDMI 2.0. So this patch only
> > > extend the work Shashank has made to GLK to CNL.
> > > 
> > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
> > >   1 file changed, 4 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > index 2d95db64cdf2..1b22b587e98c 100644
> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
> > >   		&dev_priv->vbt.ddi_port_info[encoder->port];
> > >   	int max_tmds_clock;
> > > -	if (IS_GEMINILAKE(dev_priv))
> > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> > Would it be a good idea to create a new macro called IS_HDMI2_SUPPORTED() or
> > a function is_hdmi2_supported() where we keep all the GEN check ?
> 
> I asked myself the same question.
> I believe a IS_HDMI2_SUPPORTED or HAS_HDMI2_SUPPORT is a good idea...

Typically we use HAS_* to check whether a feature is available,
and IS_* to identify a platform, or whether the parameter passed is of a certain
type.

So I believe HAS_HDMI2_SUPPORT would be correct if it's to check whether
the platform supports HDMI2.

> > >   		max_tmds_clock = 594000;
> > >   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
> > >   		max_tmds_clock = 300000;
> > > @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
> > >   	pipe_config->lane_count = 4;
> > > -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
> > > +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
> > > +					   INTEL_GEN(dev_priv) >= 10) {
> > >   		if (scdc->scrambling.low_rates)
> > >   			pipe_config->hdmi_scrambling = true;
> > > @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
> > >   	connector->doublescan_allowed = 0;
> > >   	connector->stereo_allowed = 1;
> > > -	if (IS_GEMINILAKE(dev_priv))
> > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
> > >   		connector->ycbcr_420_allowed = true;
> > Looks good otherwise.
> > - Shashank
> > >   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Nov. 17, 2017, 1:09 p.m. UTC | #8
On Wed, 15 Nov 2017, David Weinehall <david.weinehall@linux.intel.com> wrote:
> On Mon, Nov 13, 2017 at 10:47:44AM -0800, Rodrigo Vivi wrote:
>> On Sat, Nov 11, 2017 at 09:43:44AM +0000, Sharma, Shashank wrote:
>> > Regards
>> > 
>> > Shashank
>> > 
>> > 
>> > On 11/11/2017 3:56 AM, Rodrigo Vivi wrote:
>> > > Starting on GLK we support HDMI 2.0. So this patch only
>> > > extend the work Shashank has made to GLK to CNL.
>> > > 
>> > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> > > Cc: Shashank Sharma <shashank.sharma@intel.com>
>> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
>> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> > > ---
>> > >   drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
>> > >   1 file changed, 4 insertions(+), 3 deletions(-)
>> > > 
>> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>> > > index 2d95db64cdf2..1b22b587e98c 100644
>> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> > > @@ -1235,7 +1235,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
>> > >   		&dev_priv->vbt.ddi_port_info[encoder->port];
>> > >   	int max_tmds_clock;
>> > > -	if (IS_GEMINILAKE(dev_priv))
>> > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>> > Would it be a good idea to create a new macro called IS_HDMI2_SUPPORTED() or
>> > a function is_hdmi2_supported() where we keep all the GEN check ?
>> 
>> I asked myself the same question.
>> I believe a IS_HDMI2_SUPPORTED or HAS_HDMI2_SUPPORT is a good idea...
>
> Typically we use HAS_* to check whether a feature is available,
> and IS_* to identify a platform, or whether the parameter passed is of a certain
> type.
>
> So I believe HAS_HDMI2_SUPPORT would be correct if it's to check whether
> the platform supports HDMI2.

I'd rather this was more like the DP code. There's none of this "has DP
x.y support" kind of thing for the source. Instead, we look at
*features* within those specs. "supports hbr2" and so on. And those
checks tend to be more limited in scope than an overarching "hdmi 2.0
support".

BR,
Jani.

>
>> > >   		max_tmds_clock = 594000;
>> > >   	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
>> > >   		max_tmds_clock = 300000;
>> > > @@ -1511,7 +1511,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>> > >   	pipe_config->lane_count = 4;
>> > > -	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
>> > > +	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
>> > > +					   INTEL_GEN(dev_priv) >= 10) {
>> > >   		if (scdc->scrambling.low_rates)
>> > >   			pipe_config->hdmi_scrambling = true;
>> > > @@ -2033,7 +2034,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>> > >   	connector->doublescan_allowed = 0;
>> > >   	connector->stereo_allowed = 1;
>> > > -	if (IS_GEMINILAKE(dev_priv))
>> > > +	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
>> > >   		connector->ycbcr_420_allowed = true;
>> > Looks good otherwise.
>> > - Shashank
>> > >   	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
>> > 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 2d95db64cdf2..1b22b587e98c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1235,7 +1235,7 @@  static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
 		&dev_priv->vbt.ddi_port_info[encoder->port];
 	int max_tmds_clock;
 
-	if (IS_GEMINILAKE(dev_priv))
+	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
 		max_tmds_clock = 594000;
 	else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
 		max_tmds_clock = 300000;
@@ -1511,7 +1511,8 @@  bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 
 	pipe_config->lane_count = 4;
 
-	if (scdc->scrambling.supported && IS_GEMINILAKE(dev_priv)) {
+	if (scdc->scrambling.supported && (IS_GEMINILAKE(dev_priv) ||
+					   INTEL_GEN(dev_priv) >= 10) {
 		if (scdc->scrambling.low_rates)
 			pipe_config->hdmi_scrambling = true;
 
@@ -2033,7 +2034,7 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 	connector->doublescan_allowed = 0;
 	connector->stereo_allowed = 1;
 
-	if (IS_GEMINILAKE(dev_priv))
+	if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 10)
 		connector->ycbcr_420_allowed = true;
 
 	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);