2020-03-11 13:14:13

by Eugeniy Paltsev

[permalink] [raw]
Subject: [PATCH] DRM: ARC: PGU: interlaced mode not supported

Filter out interlaced modes as they are not supported by ARC PGU
hardware.

Signed-off-by: Eugeniy Paltsev <[email protected]>
---
drivers/gpu/drm/arc/arcpgu_crtc.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 8ae1e1f97a73..c854066d4c75 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -67,6 +67,9 @@ static enum drm_mode_status arc_pgu_crtc_mode_valid(struct drm_crtc *crtc,
long rate, clk_rate = mode->clock * 1000;
long diff = clk_rate / 200; /* +-0.5% allowed by HDMI spec */

+ if (mode->flags & DRM_MODE_FLAG_INTERLACE)
+ return MODE_NO_INTERLACE;
+
rate = clk_round_rate(arcpgu->clk, clk_rate);
if ((max(rate, clk_rate) - min(rate, clk_rate) < diff) && (rate > 0))
return MODE_OK;
--
2.21.1


2020-03-11 13:22:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] DRM: ARC: PGU: interlaced mode not supported

On Wed, Mar 11, 2020 at 04:13:10PM +0300, Eugeniy Paltsev wrote:
> Filter out interlaced modes as they are not supported by ARC PGU
> hardware.
>
> Signed-off-by: Eugeniy Paltsev <[email protected]>
> ---
> drivers/gpu/drm/arc/arcpgu_crtc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> index 8ae1e1f97a73..c854066d4c75 100644
> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> @@ -67,6 +67,9 @@ static enum drm_mode_status arc_pgu_crtc_mode_valid(struct drm_crtc *crtc,
> long rate, clk_rate = mode->clock * 1000;
> long diff = clk_rate / 200; /* +-0.5% allowed by HDMI spec */
>
> + if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> + return MODE_NO_INTERLACE;
> +
> rate = clk_round_rate(arcpgu->clk, clk_rate);
> if ((max(rate, clk_rate) - min(rate, clk_rate) < diff) && (rate > 0))
> return MODE_OK;
> --
> 2.21.1
>

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

2020-03-12 05:09:40

by Alexey Brodkin

[permalink] [raw]
Subject: RE: [PATCH] DRM: ARC: PGU: interlaced mode not supported

Hi Greg,

> -----Original Message-----
> From: Greg KH <[email protected]>
> Sent: Wednesday, March 11, 2020 8:22 PM
> To: Eugeniy Paltsev <[email protected]>
> Cc: [email protected]; Alexey Brodkin <[email protected]>; linux-snps-
> [email protected]; [email protected]; David Airlie <[email protected]>; Daniel Vetter
> <[email protected]>; [email protected]
> Subject: Re: [PATCH] DRM: ARC: PGU: interlaced mode not supported
>
> On Wed, Mar 11, 2020 at 04:13:10PM +0300, Eugeniy Paltsev wrote:
> > Filter out interlaced modes as they are not supported by ARC PGU
> > hardware.
> >
> > Signed-off-by: Eugeniy Paltsev <[email protected]>
> > ---
> > drivers/gpu/drm/arc/arcpgu_crtc.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> > index 8ae1e1f97a73..c854066d4c75 100644
> > --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> > +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> > @@ -67,6 +67,9 @@ static enum drm_mode_status arc_pgu_crtc_mode_valid(struct drm_crtc *crtc,
> > long rate, clk_rate = mode->clock * 1000;
> > long diff = clk_rate / 200; /* +-0.5% allowed by HDMI spec */
> >
> > + if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > + return MODE_NO_INTERLACE;
> > +
> > rate = clk_round_rate(arcpgu->clk, clk_rate);
> > if ((max(rate, clk_rate) - min(rate, clk_rate) < diff) && (rate > 0))
> > return MODE_OK;
> > --
> > 2.21.1
> >
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__http://www.kernel.org_doc_html_latest_process_stable-2Dkernel-
> 2Drules.html&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=oXPD1Sz
> FBs-0-4u24Ah1rK1Y65Fma8tJZix0Jih-yqY&s=WTVW1dC7E2oD0muPxtNd9KAHzwIZwEU9jGuCHWx1iQk&e=
> for how to do this properly.
>
> </formletter>

Thanks for the comment. I'll add "Cc: [email protected]" tag to the
patch on committing it to my maintainer tree so one the patch makes its way
up to the Linus' tree you'll get notified as usual.

-Alexey