From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: mcuelenaere@gmail.com, ben-linux@fluff.org, inki.dae@samsung.com,
kyungmin.park@samsung.com, m.szyprowski@samsung.com,
p.osciak@samsung.com, rmk@arm.linux.org.uk
Subject: + s3c-fb-automatically-calculate-pixel-clock-when-none-is-given.patch added to -mm tree
Date: Thu, 15 Jul 2010 12:36:20 -0700 [thread overview]
Message-ID: <201007151936.o6FJaKPX015165@imap1.linux-foundation.org> (raw)
The patch titled
s3c-fb: automatically calculate pixel clock when none is given
has been added to the -mm tree. Its filename is
s3c-fb-automatically-calculate-pixel-clock-when-none-is-given.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: s3c-fb: automatically calculate pixel clock when none is given
From: Maurus Cuelenaere <mcuelenaere@gmail.com>
Add a simple algorithm which calculates the pixel clock based on the video
mode parameters. This is only done when no pixel clock is supplied
through the platform data.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Cc: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/s3c-fb.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff -puN drivers/video/s3c-fb.c~s3c-fb-automatically-calculate-pixel-clock-when-none-is-given drivers/video/s3c-fb.c
--- a/drivers/video/s3c-fb.c~s3c-fb-automatically-calculate-pixel-clock-when-none-is-given
+++ a/drivers/video/s3c-fb.c
@@ -1027,6 +1027,28 @@ static struct fb_ops s3c_fb_ops = {
};
/**
+ * s3c_fb_missing_pixclock() - calculates pixel clock
+ * @mode: The video mode to change.
+ *
+ * Calculate the pixel clock when none has been given through platform data.
+ */
+static void __devinit s3c_fb_missing_pixclock(struct fb_videomode *mode)
+{
+ u64 pixclk = 1000000000000ULL;
+ u32 div;
+
+ div = mode->left_margin + mode->hsync_len + mode->right_margin +
+ mode->xres;
+ div *= mode->upper_margin + mode->vsync_len + mode->lower_margin +
+ mode->yres;
+ div *= mode->refresh ? : 60;
+
+ do_div(pixclk, div);
+
+ mode->pixclock = pixclk;
+}
+
+/**
* s3c_fb_alloc_memory() - allocate display memory for framebuffer window
* @sfb: The base resources for the hardware.
* @win: The window to initialise memory for.
@@ -1364,6 +1386,9 @@ static int __devinit s3c_fb_probe(struct
if (!pd->win[win])
continue;
+ if (!pd->win[win]->win_mode.pixclock)
+ s3c_fb_missing_pixclock(&pd->win[win]->win_mode);
+
ret = s3c_fb_probe_win(sfb, win, fbdrv->win[win],
&sfb->windows[win]);
if (ret < 0) {
_
Patches currently in -mm which might be from mcuelenaere@gmail.com are
linux-next.patch
s3c-fb-automatically-calculate-pixel-clock-when-none-is-given.patch
arm-samsung-remove-pixclock-from-several-boards.patch
next reply other threads:[~2010-07-15 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 19:36 akpm [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-07-15 18:52 + s3c-fb-automatically-calculate-pixel-clock-when-none-is-given.patch added to -mm tree akpm
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=201007151936.o6FJaKPX015165@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ben-linux@fluff.org \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mcuelenaere@gmail.com \
--cc=mm-commits@vger.kernel.org \
--cc=p.osciak@samsung.com \
--cc=rmk@arm.linux.org.uk \
/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