public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video: cfb_console: flush dcache for frame buffer in DRAM
Date: Tue, 1 May 2012 00:14:43 -0400	[thread overview]
Message-ID: <201205010014.43994.vapier@gentoo.org> (raw)
In-Reply-To: <20120430173221.538d712a@wker>

On Monday 30 April 2012 11:32:21 Anatolij Gustschin wrote:
> On Sat, 28 Apr 2012 14:16:39 -0400 Mike Frysinger wrote:
> > On Saturday 28 April 2012 11:04:07 Anatolij Gustschin wrote:
> > > +static int cfb_fb_is_in_dram(void)
> > > +{
> > > +	bd_t *bd = gd->bd;
> > > +	ulong start, end;
> > > +	int i;
> > > +
> > > +	for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
> > > +#if defined(CONFIG_ARM) || defined(CONFIG_AVR32) ||
> > > defined(COFNIG_NDS32)
> > > 
> > > || \ +defined(CONFIG_SANDBOX) || defined(CONFIG_X86)
> > > 
> > > +		start = bd->bi_dram[i].start;
> > > +		end = bd->bi_dram[i].start + bd->bi_dram[i].size - 1;
> > > +#else
> > > +		start = bd->bi_memstart;
> > > +		end = bd->bi_memsize;
> > > +#endif
> > > +
> > > +		if ((ulong)video_fb_address >= start &&
> > > +		    (ulong)video_fb_address < end)
> > > +			return 1;
> > > +	}
> > > +	return 0;
> > > +}
> > 
> > is this necessary ?  the cache funcs should take care of this
> > automatically.
> 
> Currently they don't, or at least on some architectures. Or did you mean
> that the cache instructions should take care of this?

imo, cache flush functions should be safe to call on any memory address (where 
there is data that could be dma-ed from).  this is how Linux works.

otherwise, this function ends up getting duplicated in many places and i can't 
possibly see how that's an improvement.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120501/ae23042e/attachment.pgp>

  reply	other threads:[~2012-05-01  4:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 15:04 [U-Boot] [PATCH] video: cfb_console: flush dcache for frame buffer in DRAM Anatolij Gustschin
2012-04-28 15:58 ` Pali Rohár
2012-04-28 18:16 ` Mike Frysinger
2012-04-30 15:32   ` Anatolij Gustschin
2012-05-01  4:14     ` Mike Frysinger [this message]
2012-04-30  2:25 ` Marek Vasut
2012-04-30  5:56   ` Simon Glass
2012-04-30 16:26     ` Anatolij Gustschin
2012-04-30 15:19   ` Anatolij Gustschin
2012-04-30 15:21     ` Marek Vasut
2012-04-30 15:27       ` Anatolij Gustschin
2012-04-30 15:57         ` Marek Vasut
2012-06-05  7:28 ` Anatolij Gustschin
2012-07-19 13:26   ` Mike Frysinger
2012-07-19 15:49     ` Marek Vasut
2012-07-19 16:51       ` Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2012-09-18  2:49 Eric Nelson

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=201205010014.43994.vapier@gentoo.org \
    --to=vapier@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox