2021-11-10 22:01:33

by Jiri Vanek

[permalink] [raw]
Subject: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

Fixed wrong register shift for single/dual link LVDS output.

Signed-off-by: Jiri Vanek <[email protected]>
---
drivers/gpu/drm/bridge/tc358775.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
index 2272adcc5b4a..1d6ec1baeff2 100644
--- a/drivers/gpu/drm/bridge/tc358775.c
+++ b/drivers/gpu/drm/bridge/tc358775.c
@@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
}

#define TC358775_LVCFG_LVDLINK__MASK 0x00000002
-#define TC358775_LVCFG_LVDLINK__SHIFT 0
+#define TC358775_LVCFG_LVDLINK__SHIFT 1
static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
{
return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
--
2.30.2



2021-11-18 14:50:28

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

+ Zhen & Vinay

This patch looks good in itself, but I would like to see a tested by
tag. At the very least testing for regression in single-link LVDS but
ideally some third party verification of this patch.

On Wed, 10 Nov 2021 at 23:01, Jiri Vanek <[email protected]> wrote:
>
> Fixed wrong register shift for single/dual link LVDS output.
>
> Signed-off-by: Jiri Vanek <[email protected]>
> ---
> drivers/gpu/drm/bridge/tc358775.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
> index 2272adcc5b4a..1d6ec1baeff2 100644
> --- a/drivers/gpu/drm/bridge/tc358775.c
> +++ b/drivers/gpu/drm/bridge/tc358775.c
> @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
> }
>
> #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
> -#define TC358775_LVCFG_LVDLINK__SHIFT 0
> +#define TC358775_LVCFG_LVDLINK__SHIFT 1
> static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
> {
> return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
> --
> 2.30.2
>

2022-01-04 13:51:11

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

Jiri: Are you able to test this patch?

Vinay: Could you supply a R-b tag, if you feel that it is warranted?

On Tue, 14 Dec 2021 at 09:13, Vinay Simha B N <[email protected]> wrote:
>
> Robert,
> I do not have the hardware to test this feature. Sorry for the late response.
>
> On Thu, Nov 18, 2021 at 8:20 PM Robert Foss <[email protected]> wrote:
>>
>> + Zhen & Vinay
>>
>> This patch looks good in itself, but I would like to see a tested by
>> tag. At the very least testing for regression in single-link LVDS but
>> ideally some third party verification of this patch.
>>
>> On Wed, 10 Nov 2021 at 23:01, Jiri Vanek <[email protected]> wrote:
>> >
>> > Fixed wrong register shift for single/dual link LVDS output.
>> >
>> > Signed-off-by: Jiri Vanek <[email protected]>
>> > ---
>> > drivers/gpu/drm/bridge/tc358775.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
>> > index 2272adcc5b4a..1d6ec1baeff2 100644
>> > --- a/drivers/gpu/drm/bridge/tc358775.c
>> > +++ b/drivers/gpu/drm/bridge/tc358775.c
>> > @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
>> > }
>> >
>> > #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
>> > -#define TC358775_LVCFG_LVDLINK__SHIFT 0
>> > +#define TC358775_LVCFG_LVDLINK__SHIFT 1
>> > static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
>> > {
>> > return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
>> > --
>> > 2.30.2
>> >
>
>
>
> --
> regards,
> vinaysimha

2022-01-04 14:37:10

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

Excellent.

Jiri, can you add your Tested-by tag to this patch?

On Tue, 4 Jan 2022 at 15:29, Jiří Vaněk <[email protected]> wrote:
>
> Actually, this patch is based on testing with a real HW with dual-link LVDS display (full HD) and it also matches with a datasheet. Without this fix it does not work at all.
>
> út 4. 1. 2022 v 14:51 odesílatel Robert Foss <[email protected]> napsal:
>>
>> Jiri: Are you able to test this patch?
>>
>> Vinay: Could you supply a R-b tag, if you feel that it is warranted?
>>
>> On Tue, 14 Dec 2021 at 09:13, Vinay Simha B N <[email protected]> wrote:
>> >
>> > Robert,
>> > I do not have the hardware to test this feature. Sorry for the late response.
>> >
>> > On Thu, Nov 18, 2021 at 8:20 PM Robert Foss <[email protected]> wrote:
>> >>
>> >> + Zhen & Vinay
>> >>
>> >> This patch looks good in itself, but I would like to see a tested by
>> >> tag. At the very least testing for regression in single-link LVDS but
>> >> ideally some third party verification of this patch.
>> >>
>> >> On Wed, 10 Nov 2021 at 23:01, Jiri Vanek <[email protected]> wrote:
>> >> >
>> >> > Fixed wrong register shift for single/dual link LVDS output.
>> >> >
>> >> > Signed-off-by: Jiri Vanek <[email protected]>
>> >> > ---
>> >> > drivers/gpu/drm/bridge/tc358775.c | 2 +-
>> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
>> >> > index 2272adcc5b4a..1d6ec1baeff2 100644
>> >> > --- a/drivers/gpu/drm/bridge/tc358775.c
>> >> > +++ b/drivers/gpu/drm/bridge/tc358775.c
>> >> > @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
>> >> > }
>> >> >
>> >> > #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
>> >> > -#define TC358775_LVCFG_LVDLINK__SHIFT 0
>> >> > +#define TC358775_LVCFG_LVDLINK__SHIFT 1
>> >> > static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
>> >> > {
>> >> > return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
>> >> > --
>> >> > 2.30.2
>> >> >
>> >
>> >
>> >
>> > --
>> > regards,
>> > vinaysimha

2022-01-04 16:56:17

by Vinay Simha B N

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

Robert,
What is R-b tag?


On Tue, Jan 4, 2022 at 7:21 PM Robert Foss <[email protected]> wrote:
>
> Jiri: Are you able to test this patch?
>
> Vinay: Could you supply a R-b tag, if you feel that it is warranted?
>
> On Tue, 14 Dec 2021 at 09:13, Vinay Simha B N <[email protected]> wrote:
> >
> > Robert,
> > I do not have the hardware to test this feature. Sorry for the late response.
> >
> > On Thu, Nov 18, 2021 at 8:20 PM Robert Foss <[email protected]> wrote:
> >>
> >> + Zhen & Vinay
> >>
> >> This patch looks good in itself, but I would like to see a tested by
> >> tag. At the very least testing for regression in single-link LVDS but
> >> ideally some third party verification of this patch.
> >>
> >> On Wed, 10 Nov 2021 at 23:01, Jiri Vanek <[email protected]> wrote:
> >> >
> >> > Fixed wrong register shift for single/dual link LVDS output.
> >> >
> >> > Signed-off-by: Jiri Vanek <[email protected]>
> >> > ---
> >> > drivers/gpu/drm/bridge/tc358775.c | 2 +-
> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
> >> > index 2272adcc5b4a..1d6ec1baeff2 100644
> >> > --- a/drivers/gpu/drm/bridge/tc358775.c
> >> > +++ b/drivers/gpu/drm/bridge/tc358775.c
> >> > @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
> >> > }
> >> >
> >> > #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
> >> > -#define TC358775_LVCFG_LVDLINK__SHIFT 0
> >> > +#define TC358775_LVCFG_LVDLINK__SHIFT 1
> >> > static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
> >> > {
> >> > return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
> >> > --
> >> > 2.30.2
> >> >
> >
> >
> >
> > --
> > regards,
> > vinaysimha



--
regards,
vinaysimha

2022-01-04 17:05:03

by Vinay Simha B N

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge/tc358775: Fix for dual-link LVDS

Jiri Vanek,

Could you please share the part number or datasheet of the dual-link
LVDS display used.

On Tue, Jan 4, 2022 at 7:59 PM Jiří Vaněk <[email protected]> wrote:
>
> Actually, this patch is based on testing with a real HW with dual-link LVDS display (full HD) and it also matches with a datasheet. Without this fix it does not work at all.
>
> út 4. 1. 2022 v 14:51 odesílatel Robert Foss <[email protected]> napsal:
>>
>> Jiri: Are you able to test this patch?
>>
>> Vinay: Could you supply a R-b tag, if you feel that it is warranted?
>>
>> On Tue, 14 Dec 2021 at 09:13, Vinay Simha B N <[email protected]> wrote:
>> >
>> > Robert,
>> > I do not have the hardware to test this feature. Sorry for the late response.
>> >
>> > On Thu, Nov 18, 2021 at 8:20 PM Robert Foss <[email protected]> wrote:
>> >>
>> >> + Zhen & Vinay
>> >>
>> >> This patch looks good in itself, but I would like to see a tested by
>> >> tag. At the very least testing for regression in single-link LVDS but
>> >> ideally some third party verification of this patch.
>> >>
>> >> On Wed, 10 Nov 2021 at 23:01, Jiri Vanek <[email protected]> wrote:
>> >> >
>> >> > Fixed wrong register shift for single/dual link LVDS output.
>> >> >
>> >> > Signed-off-by: Jiri Vanek <[email protected]>
>> >> > ---
>> >> > drivers/gpu/drm/bridge/tc358775.c | 2 +-
>> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
>> >> > index 2272adcc5b4a..1d6ec1baeff2 100644
>> >> > --- a/drivers/gpu/drm/bridge/tc358775.c
>> >> > +++ b/drivers/gpu/drm/bridge/tc358775.c
>> >> > @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
>> >> > }
>> >> >
>> >> > #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
>> >> > -#define TC358775_LVCFG_LVDLINK__SHIFT 0
>> >> > +#define TC358775_LVCFG_LVDLINK__SHIFT 1
>> >> > static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
>> >> > {
>> >> > return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
>> >> > --
>> >> > 2.30.2
>> >> >
>> >
>> >
>> >
>> > --
>> > regards,
>> > vinaysimha



--
regards,
vinaysimha

2022-01-06 19:00:38

by Jiri Vanek

[permalink] [raw]
Subject: [PATCH v2] drm/bridge/tc358775: Fix for dual-link LVDS

Fixed wrong register shift for single/dual link LVDS output.

Tested-by: Jiri Vanek <[email protected]>
Signed-off-by: Jiri Vanek <[email protected]>

---
v1:
* Initial version

v2:
* Tested-by tag added

---
drivers/gpu/drm/bridge/tc358775.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
index 2272adcc5b4a..1d6ec1baeff2 100644
--- a/drivers/gpu/drm/bridge/tc358775.c
+++ b/drivers/gpu/drm/bridge/tc358775.c
@@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
}

#define TC358775_LVCFG_LVDLINK__MASK 0x00000002
-#define TC358775_LVCFG_LVDLINK__SHIFT 0
+#define TC358775_LVCFG_LVDLINK__SHIFT 1
static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
{
return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
--
2.30.2


2022-01-07 16:39:46

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge/tc358775: Fix for dual-link LVDS

On Thu, 6 Jan 2022 at 20:22, Vinay Simha B N <[email protected]> wrote:
>
> Reviewed-by: Vinay Simha BN <[email protected]>
>
> Jiri Vanek,
> Could you please share the part number or datasheet of the dual-link LVDS display/panel used.
>
>
> On Fri, Jan 7, 2022 at 12:30 AM Jiri Vanek <[email protected]> wrote:
>>
>> Fixed wrong register shift for single/dual link LVDS output.
>>
>> Tested-by: Jiri Vanek <[email protected]>
>> Signed-off-by: Jiri Vanek <[email protected]>
>>
>> ---
>> v1:
>> * Initial version
>>
>> v2:
>> * Tested-by tag added
>>
>> ---
>> drivers/gpu/drm/bridge/tc358775.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
>> index 2272adcc5b4a..1d6ec1baeff2 100644
>> --- a/drivers/gpu/drm/bridge/tc358775.c
>> +++ b/drivers/gpu/drm/bridge/tc358775.c
>> @@ -241,7 +241,7 @@ static inline u32 TC358775_LVCFG_PCLKDIV(uint32_t val)
>> }
>>
>> #define TC358775_LVCFG_LVDLINK__MASK 0x00000002
>> -#define TC358775_LVCFG_LVDLINK__SHIFT 0
>> +#define TC358775_LVCFG_LVDLINK__SHIFT 1
>> static inline u32 TC358775_LVCFG_LVDLINK(uint32_t val)
>> {
>> return ((val) << TC358775_LVCFG_LVDLINK__SHIFT) &
>> --

Applied to drm-misc-next