All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] tegra: video: Always use write-through cache on LCD
Date: Thu, 14 Jan 2016 13:26:58 -0700	[thread overview]
Message-ID: <1452803219-16675-4-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1452803219-16675-1-git-send-email-sjg@chromium.org>

This seems to give the best performance, so let's use it always.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/tegra.c | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index d34189d..cb2a157 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -22,15 +22,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-enum lcd_cache_t {
-	FDT_LCD_CACHE_OFF		= 0,
-	FDT_LCD_CACHE_WRITE_THROUGH	= 1 << 0,
-	FDT_LCD_CACHE_WRITE_BACK	= 1 << 1,
-	FDT_LCD_CACHE_FLUSH		= 1 << 2,
-	FDT_LCD_CACHE_WRITE_BACK_FLUSH	= FDT_LCD_CACHE_WRITE_BACK |
-						FDT_LCD_CACHE_FLUSH,
-};
-
 /* Information about the display controller */
 struct tegra_lcd_priv {
 	int width;			/* width in pixels */
@@ -41,7 +32,6 @@ struct tegra_lcd_priv {
 	struct disp_ctlr *disp;		/* Display controller to use */
 	fdt_addr_t frame_buffer;	/* Address of frame buffer */
 	unsigned pixel_clock;		/* Pixel clock in Hz */
-	enum lcd_cache_t cache_type;
 };
 
 enum {
@@ -310,7 +300,6 @@ static int tegra_lcd_probe(struct udevice *dev)
 	struct video_priv *uc_priv = dev_get_uclass_priv(dev);
 	struct tegra_lcd_priv *priv = dev_get_priv(dev);
 	const void *blob = gd->fdt_blob;
-	int type = DCACHE_OFF;
 	int ret;
 
 	/* Initialize the Tegra display controller */
@@ -330,15 +319,11 @@ static int tegra_lcd_probe(struct udevice *dev)
 		return ret;
 	}
 
-	/* Set up the LCD caching as requested */
-	if (priv->cache_type & FDT_LCD_CACHE_WRITE_THROUGH)
-		type = DCACHE_WRITETHROUGH;
-	else if (priv->cache_type & FDT_LCD_CACHE_WRITE_BACK)
-		type = DCACHE_WRITEBACK;
-	mmu_set_region_dcache_behaviour(priv->frame_buffer, plat->size, type);
+	mmu_set_region_dcache_behaviour(priv->frame_buffer, plat->size,
+					DCACHE_WRITETHROUGH);
 
 	/* Enable flushing after LCD writes if requested */
-	video_set_flush_dcache(dev, priv->cache_type & FDT_LCD_CACHE_FLUSH);
+	video_set_flush_dcache(dev, true);
 
 	uc_priv->xsize = priv->width;
 	uc_priv->ysize = priv->height;
-- 
2.6.0.rc2.230.g3dd15c0

  parent reply	other threads:[~2016-01-14 20:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 20:26 [U-Boot] [PATCH 0/4] tegra: Move tegra20 towards the 'new' display bindings Simon Glass
2016-01-14 20:26 ` [U-Boot] [PATCH 1/4] tegra: dts: Sync seaboard device tree file with Linux Simon Glass
2016-01-18 19:32   ` Stephen Warren
2016-01-19  2:01     ` Simon Glass
2016-01-14 20:26 ` [U-Boot] [PATCH 2/4] video: tegra: Move to using simple-panel and pwm-backlight Simon Glass
2016-01-18 19:43   ` Stephen Warren
2016-01-19  2:08     ` Simon Glass
2016-01-19 16:49       ` Stephen Warren
2016-01-20  4:33         ` Simon Glass
2016-01-14 20:26 ` Simon Glass [this message]
2016-01-18 20:07   ` [U-Boot] [PATCH 3/4] tegra: video: Always use write-through cache on LCD Stephen Warren
2016-01-20 14:53     ` Thierry Reding
2016-01-20 16:18       ` Simon Glass
2016-01-14 20:26 ` [U-Boot] [PATCH 4/4] fdt: Drop some unused compatible strings Simon Glass
2016-01-14 20:34 ` [U-Boot] [PATCH 0/4] tegra: Move tegra20 towards the 'new' display bindings Lucas Stach
2016-01-14 23:12   ` Simon Glass
2016-01-18 19:52     ` Stephen Warren
2016-01-19  1:58       ` Simon Glass
2016-01-19 16:47         ` Stephen Warren
2016-01-20 15:37           ` Thierry Reding
2016-01-20 16:18             ` Simon Glass
2016-01-18 19:57 ` Stephen Warren
2016-01-19  1:58   ` Simon Glass

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=1452803219-16675-4-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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.