All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: dri-devel@lists.freedesktop.org
Cc: Marek Vasut <marex@denx.de>, Peng Fan <peng.fan@nxp.com>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sam Ravnborg <sam@ravnborg.org>, Robby Cai <robby.cai@nxp.com>
Subject: [PATCH 7/9] drm: mxsfb: Reorder mxsfb_crtc_mode_set_nofb()
Date: Mon, 28 Feb 2022 01:46:03 +0100	[thread overview]
Message-ID: <20220228004605.367040-7-marex@denx.de> (raw)
In-Reply-To: <20220228004605.367040-1-marex@denx.de>

Reorder mxsfb_crtc_mode_set_nofb() such that all functions which perform
register IO are called from one single location in this function. This is
a clean up. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Robby Cai <robby.cai@nxp.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stefan Agner <stefan@agner.ch>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 14f5cc590a51b..497603964add8 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -289,13 +289,6 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb,
 	u32 bus_flags = mxsfb->connector->display_info.bus_flags;
 	int err;
 
-	/* Mandatory eLCDIF reset as per the Reference Manual */
-	err = mxsfb_reset_block(mxsfb);
-	if (err)
-		return;
-
-	mxsfb_set_formats(mxsfb, bus_format);
-
 	if (mxsfb->bridge && mxsfb->bridge->timings)
 		bus_flags = mxsfb->bridge->timings->input_bus_flags;
 
@@ -306,6 +299,13 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb,
 			     bus_flags);
 	DRM_DEV_DEBUG_DRIVER(drm->dev, "Mode flags: 0x%08X\n", m->flags);
 
+	/* Mandatory eLCDIF reset as per the Reference Manual */
+	err = mxsfb_reset_block(mxsfb);
+	if (err)
+		return;
+
+	mxsfb_set_formats(mxsfb, bus_format);
+
 	mxsfb_set_mode(mxsfb, bus_flags);
 }
 
-- 
2.34.1


  parent reply	other threads:[~2022-02-28  0:47 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  0:45 [PATCH 1/9] dt-bindings: mxsfb: Add compatible for i.MX8MP Marek Vasut
2022-02-28  0:45 ` Marek Vasut
2022-02-28  0:45 ` [PATCH 2/9] drm: mxsfb: Simplify LCDIF clock handling Marek Vasut
2022-02-28  0:45 ` [PATCH 3/9] drm: mxsfb: Simplify LCDIF IRQ handling Marek Vasut
2022-02-28  0:46 ` [PATCH 4/9] drm: mxsfb: Wrap FIFO reset and comments into mxsfb_reset_block() Marek Vasut
2022-02-28  0:46 ` [PATCH 5/9] drm: mxsfb: Move mxsfb_get_fb_paddr() away from register IO functions Marek Vasut
2022-02-28  0:46 ` [PATCH 6/9] drm: mxsfb: Factor out mxsfb_set_mode() Marek Vasut
2022-02-28  0:46 ` Marek Vasut [this message]
2022-02-28  0:46 ` [PATCH 8/9] drm: mxsfb: Factor out mxsfb_update_buffer() Marek Vasut
2022-02-28  0:46 ` [PATCH 9/9] drm: mxsfb: Add support for i.MX8MP LCDIF variant Marek Vasut
2022-02-28  3:48   ` kernel test robot
2022-02-28  3:48     ` kernel test robot
2022-02-28  6:37 ` [PATCH 1/9] dt-bindings: mxsfb: Add compatible for i.MX8MP Liu Ying
2022-02-28  6:37   ` Liu Ying
2022-02-28  6:57   ` Marek Vasut
2022-02-28  6:57     ` Marek Vasut
2022-02-28  8:18     ` Liu Ying
2022-02-28  8:18       ` Liu Ying
2022-02-28 15:34       ` Marek Vasut
2022-02-28 15:34         ` Marek Vasut
2022-03-01  2:44         ` Liu Ying
2022-03-01  2:44           ` Liu Ying
2022-03-01 10:04           ` Lucas Stach
2022-03-01 10:19             ` Marek Vasut
2022-03-01 11:05               ` Lucas Stach
2022-03-01 13:03                 ` Adam Ford
2022-03-01 13:03                   ` Adam Ford
2022-03-01 13:18                   ` Lucas Stach
2022-03-01 13:18                     ` Lucas Stach
2022-03-01 13:37                     ` [EXT] " Robby Cai
2022-03-01 13:37                       ` Robby Cai
2022-03-02  2:49                       ` Marek Vasut
2022-03-02  2:49                         ` Marek Vasut
2022-03-02 13:14                         ` Robby Cai
2022-03-02 13:14                           ` Robby Cai
2022-03-03  3:16                           ` Marek Vasut
2022-03-03  3:16                             ` Marek Vasut
2022-03-02  2:54                     ` Marek Vasut
2022-03-02  2:54                       ` Marek Vasut
2022-03-02  9:23                       ` Lucas Stach
2022-03-02  9:23                         ` Lucas Stach
2022-03-02  9:41                         ` Liu Ying
2022-03-02  9:41                           ` Liu Ying
2022-03-02 11:57                           ` Lucas Stach
2022-03-02 11:57                             ` Lucas Stach
2022-03-03  2:54                             ` Liu Ying
2022-03-03  2:54                               ` Liu Ying
2022-03-03  4:14                               ` Marek Vasut
2022-03-03  4:14                                 ` Marek Vasut
2022-03-03  8:19                               ` Lucas Stach
2022-03-03  8:19                                 ` Lucas Stach
2022-03-03  9:14                                 ` Liu Ying
2022-03-03  9:14                                   ` Liu Ying
2022-03-03  3:14                         ` Marek Vasut
2022-03-03  3:14                           ` Marek Vasut
2022-03-03  8:21                           ` Lucas Stach
2022-03-03  8:21                             ` Lucas Stach
2022-03-04  4:50                             ` Marek Vasut
2022-03-04  4:50                               ` Marek Vasut
2022-02-28  6:40 ` Laurent Pinchart
2022-02-28  6:40   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228004605.367040-7-marex@denx.de \
    --to=marex@denx.de \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peng.fan@nxp.com \
    --cc=robby.cai@nxp.com \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.