diff mbox series

[v2] drm/bridge: tfp410: add pclk limits

Message ID 20200121094655.9092-1-tomi.valkeinen@ti.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/bridge: tfp410: add pclk limits | expand

Commit Message

Tomi Valkeinen Jan. 21, 2020, 9:46 a.m. UTC
Add pixel clock limits to the driver as per TFP410 datasheet: min 25MHz,
max 165MHz.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Tomi Valkeinen Feb. 10, 2020, 8:21 a.m. UTC | #1
Hi Andrzej,

On 21/01/2020 11:46, Tomi Valkeinen wrote:
> Add pixel clock limits to the driver as per TFP410 datasheet: min 25MHz,
> max 165MHz.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>   drivers/gpu/drm/bridge/ti-tfp410.c | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index 6f6d6d1e60ae..108e8cd7ab68 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -167,10 +167,23 @@ static void tfp410_disable(struct drm_bridge *bridge)
>   	gpiod_set_value_cansleep(dvi->powerdown, 1);
>   }
>   
> +static enum drm_mode_status tfp410_mode_valid(struct drm_bridge *bridge,
> +					      const struct drm_display_mode *mode)
> +{
> +	if (mode->clock < 25000)
> +		return MODE_CLOCK_LOW;
> +
> +	if (mode->clock > 165000)
> +		return MODE_CLOCK_HIGH;
> +
> +	return MODE_OK;
> +}
> +
>   static const struct drm_bridge_funcs tfp410_bridge_funcs = {
>   	.attach		= tfp410_attach,
>   	.enable		= tfp410_enable,
>   	.disable	= tfp410_disable,
> +	.mode_valid	= tfp410_mode_valid,
>   };
>   
>   static void tfp410_hpd_work_func(struct work_struct *work)
> 

Is this ok to merge?

  Tomi
Andrzej Hajda Feb. 10, 2020, 8:49 a.m. UTC | #2
On 10.02.2020 09:21, Tomi Valkeinen wrote:
> Hi Andrzej,
>
> On 21/01/2020 11:46, Tomi Valkeinen wrote:
>> Add pixel clock limits to the driver as per TFP410 datasheet: min 25MHz,
>> max 165MHz.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>>   drivers/gpu/drm/bridge/ti-tfp410.c | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
>> index 6f6d6d1e60ae..108e8cd7ab68 100644
>> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
>> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
>> @@ -167,10 +167,23 @@ static void tfp410_disable(struct drm_bridge *bridge)
>>   	gpiod_set_value_cansleep(dvi->powerdown, 1);
>>   }
>>   
>> +static enum drm_mode_status tfp410_mode_valid(struct drm_bridge *bridge,
>> +					      const struct drm_display_mode *mode)
>> +{
>> +	if (mode->clock < 25000)
>> +		return MODE_CLOCK_LOW;
>> +
>> +	if (mode->clock > 165000)
>> +		return MODE_CLOCK_HIGH;
>> +
>> +	return MODE_OK;
>> +}
>> +
>>   static const struct drm_bridge_funcs tfp410_bridge_funcs = {
>>   	.attach		= tfp410_attach,
>>   	.enable		= tfp410_enable,
>>   	.disable	= tfp410_disable,
>> +	.mode_valid	= tfp410_mode_valid,
>>   };
>>   
>>   static void tfp410_hpd_work_func(struct work_struct *work)
>>
> Is this ok to merge?


Yes, If I remember you have merge rights. If not, let me know.


Andrzej


>
>   Tomi
>
Tomi Valkeinen Feb. 10, 2020, 9:05 a.m. UTC | #3
On 10/02/2020 10:49, Andrzej Hajda wrote:

>> Is this ok to merge?
> 
> 
> Yes, If I remember you have merge rights. If not, let me know.

Yes, I have.

Generally speaking, how do you manage bridge patches? If you give reviewed-by/acked-by, does it mean 
it's good for the sender to push to drm-misc-next? Or do you usually merge bridge patches yourself?

  Tomi
Neil Armstrong Feb. 10, 2020, 9:07 a.m. UTC | #4
Hi,

On 10/02/2020 10:05, Tomi Valkeinen wrote:
> On 10/02/2020 10:49, Andrzej Hajda wrote:
> 
>>> Is this ok to merge?
>>
>>
>> Yes, If I remember you have merge rights. If not, let me know.
> 
> Yes, I have.
> 
> Generally speaking, how do you manage bridge patches? If you give reviewed-by/acked-by, does it mean it's good for the sender to push to drm-misc-next? Or do you usually merge bridge patches yourself?

If you have the merge rights and one of our r-b/a-b, you can push it yourself. Otherwise we can push them if you can't or unsure.

Neil

> 
>  Tomi
>
Andrzej Hajda Feb. 10, 2020, 9:33 a.m. UTC | #5
On 10.02.2020 10:05, Tomi Valkeinen wrote:
> On 10/02/2020 10:49, Andrzej Hajda wrote:
>
>>> Is this ok to merge?
>>
>> Yes, If I remember you have merge rights. If not, let me know.
> Yes, I have.
>
> Generally speaking, how do you manage bridge patches? If you give reviewed-by/acked-by, does it mean 
> it's good for the sender to push to drm-misc-next?


Yes, unless other reviewers found some issues :) it would be good then
to wait for their acceptance.

My bad, I did not write it in my r-b mail, I hope next it will be better :)


Regards

Andrzej


>  Or do you usually merge bridge patches yourself?
>
>   Tomi
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index 6f6d6d1e60ae..108e8cd7ab68 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -167,10 +167,23 @@  static void tfp410_disable(struct drm_bridge *bridge)
 	gpiod_set_value_cansleep(dvi->powerdown, 1);
 }
 
+static enum drm_mode_status tfp410_mode_valid(struct drm_bridge *bridge,
+					      const struct drm_display_mode *mode)
+{
+	if (mode->clock < 25000)
+		return MODE_CLOCK_LOW;
+
+	if (mode->clock > 165000)
+		return MODE_CLOCK_HIGH;
+
+	return MODE_OK;
+}
+
 static const struct drm_bridge_funcs tfp410_bridge_funcs = {
 	.attach		= tfp410_attach,
 	.enable		= tfp410_enable,
 	.disable	= tfp410_disable,
+	.mode_valid	= tfp410_mode_valid,
 };
 
 static void tfp410_hpd_work_func(struct work_struct *work)