Re: [PATCH 5/7] media: renesas: vsp1: Add new formats (2-10-10-10 ARGB, Y210)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/12/2022 16:38, Geert Uytterhoeven wrote:
Hi Tomi,

On Tue, Dec 6, 2022 at 2:44 PM Tomi Valkeinen
<tomi.valkeinen+renesas@xxxxxxxxxxxxxxxx> wrote:
Add new pixel formats: XBGR2101010, ABGR2101010, BGRA1010102 and Y210.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@xxxxxxxxxxxxxxxx>

Thanks for your patch!

--- a/drivers/media/platform/renesas/vsp1/vsp1_rpf.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_rpf.c
@@ -109,6 +109,56 @@ static void rpf_configure_stream(struct vsp1_entity *entity,
         vsp1_rpf_write(rpf, dlb, VI6_RPF_INFMT, infmt);
         vsp1_rpf_write(rpf, dlb, VI6_RPF_DSWAP, fmtinfo->swap);

+       if ((entity->vsp1->version & VI6_IP_VERSION_MODEL_MASK) == VI6_IP_VERSION_MODEL_VSPD_GEN4) {
+               u32 ext_infmt0;
+               u32 ext_infmt1;
+               u32 ext_infmt2;
+
+               switch (fmtinfo->fourcc) {
+               case V4L2_PIX_FMT_XBGR2101010:
+                       ext_infmt0 = VI6_RPF_EXT_INFMT0_BYPP_M1_RGB10;
+                       ext_infmt1 = (0 << 24)  | (10 << 16) |
+                                    (20 << 8)  | (30 << 0);

Introducing PACK_CPOS(a, b, c, d)...

+                       ext_infmt2 = (10 << 24) | (10 << 16) |
+                                    (10 << 8)  | (0 << 0);

... and PACK_CLEN(a, b, c, d) macros (or a single PACK4() macro)
can make this less error-prone.

Thanks. It does, and I found an error in V4L2_PIX_FMT_BGRA1010102 =).

 Tomi




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux