* [PATCH] drm/bridge: anx7625: Fix not correct get property counts
@ 2022-03-10 9:16 ` Xin Ji
0 siblings, 0 replies; 6+ messages in thread
From: Xin Ji @ 2022-03-10 9:16 UTC (permalink / raw
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
Xin Ji
Cc: bliang, qwen, hsinyi, mliu, dri-devel, linux-kernel
The property length which returns from "of_get_property", divided by
sizeof(int) to get the total property counts.
Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
Signed-off-by: Xin Ji <xji@analogixsemi.com>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index c6a9a02ed762..87081d5b408d 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
if (of_get_property(dev->of_node,
"analogix,lane0-swing", &num_regs)) {
+ num_regs /= sizeof(int);
if (num_regs > DP_TX_SWING_REG_CNT)
num_regs = DP_TX_SWING_REG_CNT;
@@ -1604,6 +1605,7 @@ static int anx7625_get_swing_setting(struct device *dev,
if (of_get_property(dev->of_node,
"analogix,lane1-swing", &num_regs)) {
+ num_regs /= sizeof(int);
if (num_regs > DP_TX_SWING_REG_CNT)
num_regs = DP_TX_SWING_REG_CNT;
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/bridge: anx7625: Fix not correct get property counts
@ 2022-03-10 9:16 ` Xin Ji
0 siblings, 0 replies; 6+ messages in thread
From: Xin Ji @ 2022-03-10 9:16 UTC (permalink / raw
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
Xin Ji
Cc: qwen, linux-kernel, dri-devel, mliu, hsinyi, bliang
The property length which returns from "of_get_property", divided by
sizeof(int) to get the total property counts.
Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
Signed-off-by: Xin Ji <xji@analogixsemi.com>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index c6a9a02ed762..87081d5b408d 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
if (of_get_property(dev->of_node,
"analogix,lane0-swing", &num_regs)) {
+ num_regs /= sizeof(int);
if (num_regs > DP_TX_SWING_REG_CNT)
num_regs = DP_TX_SWING_REG_CNT;
@@ -1604,6 +1605,7 @@ static int anx7625_get_swing_setting(struct device *dev,
if (of_get_property(dev->of_node,
"analogix,lane1-swing", &num_regs)) {
+ num_regs /= sizeof(int);
if (num_regs > DP_TX_SWING_REG_CNT)
num_regs = DP_TX_SWING_REG_CNT;
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: anx7625: Fix not correct get property counts
2022-03-10 9:16 ` Xin Ji
@ 2022-03-10 18:53 ` Sam Ravnborg
-1 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2022-03-10 18:53 UTC (permalink / raw
To: Xin Ji
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter, qwen,
linux-kernel, dri-devel, mliu, hsinyi, bliang
Hi Xin,
On Thu, Mar 10, 2022 at 05:16:53PM +0800, Xin Ji wrote:
> The property length which returns from "of_get_property", divided by
> sizeof(int) to get the total property counts.
>
> Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
>
> Signed-off-by: Xin Ji <xji@analogixsemi.com>
> ---
> drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index c6a9a02ed762..87081d5b408d 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
>
> if (of_get_property(dev->of_node,
> "analogix,lane0-swing", &num_regs)) {
> + num_regs /= sizeof(int);
Since the property is an array maybe use: of_property_read_u8_array()
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: anx7625: Fix not correct get property counts
@ 2022-03-10 18:53 ` Sam Ravnborg
0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2022-03-10 18:53 UTC (permalink / raw
To: Xin Ji
Cc: dri-devel, Jonas Karlman, David Airlie, Robert Foss, qwen,
Neil Armstrong, linux-kernel, Jernej Skrabec, mliu,
Laurent Pinchart, Andrzej Hajda, hsinyi, bliang
Hi Xin,
On Thu, Mar 10, 2022 at 05:16:53PM +0800, Xin Ji wrote:
> The property length which returns from "of_get_property", divided by
> sizeof(int) to get the total property counts.
>
> Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
>
> Signed-off-by: Xin Ji <xji@analogixsemi.com>
> ---
> drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index c6a9a02ed762..87081d5b408d 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
>
> if (of_get_property(dev->of_node,
> "analogix,lane0-swing", &num_regs)) {
> + num_regs /= sizeof(int);
Since the property is an array maybe use: of_property_read_u8_array()
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: anx7625: Fix not correct get property counts
2022-03-10 18:53 ` Sam Ravnborg
@ 2022-03-11 2:59 ` Xin Ji
-1 siblings, 0 replies; 6+ messages in thread
From: Xin Ji @ 2022-03-11 2:59 UTC (permalink / raw
To: Sam Ravnborg
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter, qwen,
linux-kernel, dri-devel, mliu, hsinyi, bliang
On Thu, Mar 10, 2022 at 07:53:59PM +0100, Sam Ravnborg wrote:
> Hi Xin,
>
> On Thu, Mar 10, 2022 at 05:16:53PM +0800, Xin Ji wrote:
> > The property length which returns from "of_get_property", divided by
> > sizeof(int) to get the total property counts.
> >
> > Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> > drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index c6a9a02ed762..87081d5b408d 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
> >
> > if (of_get_property(dev->of_node,
> > "analogix,lane0-swing", &num_regs)) {
> > + num_regs /= sizeof(int);
>
> Since the property is an array maybe use: of_property_read_u8_array()
>
> Sam
Hi Sam, OK, I'll use it to get property data.
Thanks,
Xin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: anx7625: Fix not correct get property counts
@ 2022-03-11 2:59 ` Xin Ji
0 siblings, 0 replies; 6+ messages in thread
From: Xin Ji @ 2022-03-11 2:59 UTC (permalink / raw
To: Sam Ravnborg
Cc: dri-devel, Jonas Karlman, David Airlie, Robert Foss, qwen,
Neil Armstrong, linux-kernel, Jernej Skrabec, mliu,
Laurent Pinchart, Andrzej Hajda, hsinyi, bliang
On Thu, Mar 10, 2022 at 07:53:59PM +0100, Sam Ravnborg wrote:
> Hi Xin,
>
> On Thu, Mar 10, 2022 at 05:16:53PM +0800, Xin Ji wrote:
> > The property length which returns from "of_get_property", divided by
> > sizeof(int) to get the total property counts.
> >
> > Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> > drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index c6a9a02ed762..87081d5b408d 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
> >
> > if (of_get_property(dev->of_node,
> > "analogix,lane0-swing", &num_regs)) {
> > + num_regs /= sizeof(int);
>
> Since the property is an array maybe use: of_property_read_u8_array()
>
> Sam
Hi Sam, OK, I'll use it to get property data.
Thanks,
Xin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-11 2:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 9:16 [PATCH] drm/bridge: anx7625: Fix not correct get property counts Xin Ji
2022-03-10 9:16 ` Xin Ji
2022-03-10 18:53 ` Sam Ravnborg
2022-03-10 18:53 ` Sam Ravnborg
2022-03-11 2:59 ` Xin Ji
2022-03-11 2:59 ` Xin Ji
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.