From: Anatolij Gustschin <agust@denx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] drivers/video: fsl-diu-fb: fix pixel formats for 24 and 16 bpp
Date: Thu, 17 Jan 2013 22:48:08 +0000 [thread overview]
Message-ID: <20130117234808.4fb94a7c@crub> (raw)
In-Reply-To: <1358454518-14032-1-git-send-email-agust@denx.de>
On Thu, 17 Jan 2013 16:12:05 -0600
Timur Tabi <timur@tabi.org> wrote:
> Anatolij Gustschin wrote:
> > /* 0x88883316 */
> > - return MAKE_PF(3, 2, 0, 1, 3, 8, 8, 8, 8);
> > + return MAKE_PF(3, 2, 1, 0, 3, 8, 8, 8, 8);
> > case 24:
> > /* 0x88082219 */
> > - return MAKE_PF(4, 0, 1, 2, 2, 0, 8, 8, 8);
> > + return MAKE_PF(4, 0, 1, 2, 2, 8, 8, 8, 0);
> > case 16:
> > /* 0x65053118 */
> > return MAKE_PF(4, 2, 1, 0, 1, 5, 6, 5, 0);
>
> You're right that the original values are incorrect, but I think your
> patch is changing the wrong lines.
No.
> I put this code in the driver:
>
> printk(KERN_INFO "%s:%u 0x88883316 old %08x new %08x\n", __func__,
> __LINE__, MAKE_PF(3, 2, 0, 1, 3, 8, 8, 8, 8), MAKE_PF(3, 2, 1, 0, 3, 8, 8,
> 8, 8));
> printk(KERN_INFO "%s:%u 0x88082219 old %08x new %08x\n", __func__,
> __LINE__, MAKE_PF(4, 0, 1, 2, 2, 0, 8, 8, 8), MAKE_PF(4, 0, 1, 2, 2, 8, 8,
> 8, 0));
> printk(KERN_INFO "%s:%u 0x65053118 %08x\n", __func__, __LINE__,
> MAKE_PF(4, 2, 1, 0, 1, 5, 6, 5, 0));
>
>
> and it gave me this output:
>
> fsl_diu_get_pixel_format:956 0x88883316 old 88883316 new 88889316
>
> fsl_diu_get_pixel_format:957 0x88082219 old 8088c218 new 8808c218
>
> fsl_diu_get_pixel_format:958 0x65053118 65059118
>
> fsl_diu_get_pixel_format:956 0x88883316 old 88883316 new 88889316
>
> fsl_diu_get_pixel_format:957 0x88082219 old 8088c218 new 8808c218
>
> fsl_diu_get_pixel_format:958 0x65053118 65059118
>
> Console: switching to colour frame buffer device 182x73
>
> So the value for 32-bit is already correct, but your patch breaks it.
No, my patch doesn't break it. The patch also modifies the order of
red, blue, green arguments in the MAKE_PF() macro to red, green, blue
order since this is more natural:
-#define MAKE_PF(alpha, red, blue, green, size, c0, c1, c2, c3) \
+#define MAKE_PF(alpha, red, green, blue, size, c0, c1, c2, c3) \
> value for 24-bit is wrong, but your patch just gives me another wrong
> value. The value for 16-bit is wrong, but you don't change that.
No. Please read the whole patch and commit message again.
Thanks,
Anatolij
next prev parent reply other threads:[~2013-01-17 22:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 20:28 [PATCH 1/2] drivers/video: fsl-diu-fb: fix pixel formats for 24 and 16 bpp Anatolij Gustschin
2013-01-17 22:12 ` Timur Tabi
2013-01-17 22:48 ` Anatolij Gustschin [this message]
2013-01-17 23:01 ` Timur Tabi
2013-01-17 23:08 ` Timur Tabi
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=20130117234808.4fb94a7c@crub \
--to=agust@denx.de \
--cc=linux-fbdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).