2019-08-29 11:31:44

by Robert Chiras

[permalink] [raw]
Subject: [PATCH v4 02/14] drm/mxsfb: Read bus flags from bridge if present

From: Guido Günther <[email protected]>

The bridge might have special requirmentes on the input bus. This
is e.g. used by the imx-nwl bridge.

Signed-off-by: Guido Günther <[email protected]>
Reviewed-by: Stefan Agner <[email protected]>
---
drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
index de09b93..b69ace8 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
@@ -209,7 +209,7 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb)
{
struct drm_device *drm = mxsfb->pipe.crtc.dev;
struct drm_display_mode *m = &mxsfb->pipe.crtc.state->adjusted_mode;
- const u32 bus_flags = mxsfb->connector->display_info.bus_flags;
+ u32 bus_flags = mxsfb->connector->display_info.bus_flags;
u32 vdctrl0, vsync_pulse_len, hsync_pulse_len;
int err;

@@ -233,6 +233,9 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb)

clk_set_rate(mxsfb->clk, m->crtc_clock * 1000);

+ if (mxsfb->bridge && mxsfb->bridge->timings)
+ bus_flags = mxsfb->bridge->timings->input_bus_flags;
+
DRM_DEV_DEBUG_DRIVER(drm->dev, "Pixel clock: %dkHz (actual: %dkHz)\n",
m->crtc_clock,
(int)(clk_get_rate(mxsfb->clk) / 1000));
--
2.7.4


2019-10-15 00:29:14

by Stefan Agner

[permalink] [raw]
Subject: Re: [PATCH v4 02/14] drm/mxsfb: Read bus flags from bridge if present

On 2019-08-29 13:30, Robert Chiras wrote:
> From: Guido Günther <[email protected]>
>
> The bridge might have special requirmentes on the input bus. This
> is e.g. used by the imx-nwl bridge.
>
> Signed-off-by: Guido Günther <[email protected]>
> Reviewed-by: Stefan Agner <[email protected]>

Applied to the drm-misc-next branch.

I decided to apply those two since they are independent from the rest.
You can drop them in the next spin of the rest.

--
Stefan


> ---
> drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
> b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
> index de09b93..b69ace8 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c
> @@ -209,7 +209,7 @@ static void mxsfb_crtc_mode_set_nofb(struct
> mxsfb_drm_private *mxsfb)
> {
> struct drm_device *drm = mxsfb->pipe.crtc.dev;
> struct drm_display_mode *m = &mxsfb->pipe.crtc.state->adjusted_mode;
> - const u32 bus_flags = mxsfb->connector->display_info.bus_flags;
> + u32 bus_flags = mxsfb->connector->display_info.bus_flags;
> u32 vdctrl0, vsync_pulse_len, hsync_pulse_len;
> int err;
>
> @@ -233,6 +233,9 @@ static void mxsfb_crtc_mode_set_nofb(struct
> mxsfb_drm_private *mxsfb)
>
> clk_set_rate(mxsfb->clk, m->crtc_clock * 1000);
>
> + if (mxsfb->bridge && mxsfb->bridge->timings)
> + bus_flags = mxsfb->bridge->timings->input_bus_flags;
> +
> DRM_DEV_DEBUG_DRIVER(drm->dev, "Pixel clock: %dkHz (actual: %dkHz)\n",
> m->crtc_clock,
> (int)(clk_get_rate(mxsfb->clk) / 1000));