From: Frederic Konrad <fred.konrad@greensocs.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: peter.crosthwaite@xilinx.com, mark.burton@greensocs.com,
qemu-devel@nongnu.org, hyunk@xilinx.com
Subject: Re: [Qemu-devel] [PATCH 3/8] console: add qemu_alloc_display_format.
Date: Mon, 18 May 2015 09:51:20 +0200 [thread overview]
Message-ID: <555999F8.80609@greensocs.com> (raw)
In-Reply-To: <1431934462.10826.1.camel@nilsson.home.kraxel.org>
On 18/05/2015 09:34, Gerd Hoffmann wrote:
> On Mi, 2015-05-13 at 21:12 +0200, fred.konrad@greensocs.com wrote:
>> From: KONRAD Frederic <fred.konrad@greensocs.com>
>>
>> This allows to create a surface with a different format than xrgb8888.
> What is the use case for this?
>
> cheers,
> Gerd
>
>
>
Hi,
The Display Port introduced in patch 7 and the driver use differents
pixel format.
eg: rgb565, RGB888, etc. see xilinx_dp_change_graphic_fmt in patch 7:
+static void xilinx_dp_change_graphic_fmt(XilinxDPState *s)
+{
+ switch (s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK) {
+ case DP_GRAPHIC_RGBA8888:
+ s->planes[0].format = PIXMAN_r8g8b8a8;
+ break;
+ case DP_GRAPHIC_ABGR8888:
+ s->planes[0].format = PIXMAN_a8b8g8r8;
+ break;
+ case DP_GRAPHIC_RGB565:
+ s->planes[0].format = PIXMAN_r5g6b5;
+ break;
+ case DP_GRAPHIC_RGB888:
+ s->planes[0].format = PIXMAN_r8g8b8;
+ break;
+ case DP_GRAPHIC_BGR888:
+ s->planes[0].format = PIXMAN_b8g8r8;
+ break;
+ default:
+ DPRINTF("error: unsupported graphic format %u.\n",
+ s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
+ abort();
+ break;
+ }
+
+ switch (s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK) {
+ case 0:
+ s->planes[1].format = PIXMAN_r8g8b8a8;
+ break;
+ case DP_NL_VID_RGBA8880:
+ s->planes[1].format = PIXMAN_r8g8b8a8;
+ break;
+ default:
+ DPRINTF("error: unsupported video format %u.\n",
+ s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
+ abort();
+ break;
+ }
+
+ xilinx_dp_recreate_surface(s);
+}
It needs alpha blending of two planes as well. I do this work with pixman.
Thanks,
Fred
next prev parent reply other threads:[~2015-05-18 7:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 19:11 [Qemu-devel] [PATCH 0/8] Xilinx DisplayPort fred.konrad
2015-05-13 19:11 ` [Qemu-devel] [PATCH 1/8] Introduce AUX bus fred.konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 2/8] i2c: implement broadcast write fred.konrad
2015-05-14 3:58 ` Peter Crosthwaite
2015-05-13 19:12 ` [Qemu-devel] [PATCH 3/8] console: add qemu_alloc_display_format fred.konrad
2015-05-18 7:34 ` Gerd Hoffmann
2015-05-18 7:51 ` Frederic Konrad [this message]
2015-05-18 11:17 ` Gerd Hoffmann
2015-05-18 11:56 ` Frederic Konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 4/8] introduce dpcd module fred.konrad
2015-05-14 4:10 ` Peter Crosthwaite
2015-05-18 13:57 ` Frederic Konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 5/8] hw/i2c-ddc.c: Implement DDC I2C slave fred.konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 6/8] Introduce xilinx dpdma fred.konrad
2015-05-18 8:17 ` Peter Crosthwaite
2015-05-18 8:43 ` Frederic Konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 7/8] Introduce xilinx dp fred.konrad
2015-05-13 19:12 ` [Qemu-devel] [PATCH 8/8] arm: xlnx-zynqmp: Add DisplayPort and DPDMA fred.konrad
2015-05-14 3:30 ` Peter Crosthwaite
2015-05-18 6:58 ` Frederic Konrad
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=555999F8.80609@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=hyunk@xilinx.com \
--cc=kraxel@redhat.com \
--cc=mark.burton@greensocs.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.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).