pmaports/device/archived/linux-xiaomi-lavender-downstream/0005-Adds-and-sets-BGRA-as-default.patch
Stefan Hansson fb7f99efe2
device: rename unmaintained to archived (MR 5046)
Unmaintained is a name which on multiple occasions have seen lead to
confusion with people having the impression that unmaintained is for all
unmaintained devices, which is not how we're really using it. Many
devices in testing do not actually have a maintainer, yet there has been
no push to move these out of there and into unmaintained.

I think this is a result of that unmaintained was introduced not to keep
unmaintained ports but rather a place to store ports that have a better
replacement but where the inferior one still holds some sort of value,
such as for debugging purposes. These ports also are not necessarily
entirely unmaintained and see more fixes than many ports in testing.

While one approach to solving this problem could be to simply moving all
unmaintained ports to unmaintained, I think this comes with some
problems: It would require an initial effort to figure out which ports
are indeed unmaintained and which just don't have a maintained noted in
the package, and given how many ports there are in testing this would be
a big endeavour. It would also require continuous work on moving ports
into unmaintained as the maintainers go silent if we are to keep testing
and unmaintained's state consistent with reality. Additionally, just
because a port doesn't have a maintainer on paper doens't mean that
there aren't people who aren't willing to fix it up if there are issues
that arise.

As such, I think the way to go is renaming unmaintained to better
reflect the original intent. Thanks to Luca Weiss for suggesting
"archive", and to Arnav Singh for suggesting that "archived" would match
the other category names better.
2024-05-15 17:07:51 +02:00

55 lines
1.6 KiB
Diff

From 49ffc82cc85eb62f9abe5b2fa546dea0744d9829 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Sun, 29 Sep 2019 14:02:41 -0400
Subject: [PATCH 5/6] Adds and sets BGRA as default
This fixes the issue of Red and Blue channels being mixed up from the
expected.
Signed-off-by: Alexey Min <alexey.min@gmail.com>
---
drivers/video/fbdev/msm/mdss_fb.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index 3e632076639d..e4915a4738dc 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -1751,7 +1751,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_scale = 1024;
mfd->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ mfd->fb_imgType = MDP_BGRA_8888;
mfd->calib_mode_bl = 0;
mfd->unset_bl_level = U32_MAX;
mfd->bl_extn_level = -1;
@@ -3169,6 +3169,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
bpp = 4;
break;
+ case MDP_BGRA_8888:
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->xpanstep = 1;
+ fix->ypanstep = 1;
+ var->vmode = FB_VMODE_NONINTERLACED;
+ var->blue.offset = 0;
+ var->green.offset = 8;
+ var->red.offset = 16;
+ var->blue.length = 8;
+ var->green.length = 8;
+ var->red.length = 8;
+ var->blue.msb_right = 0;
+ var->green.msb_right = 0;
+ var->red.msb_right = 0;
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ bpp = 4;
+ break;
+
case MDP_YCRYCB_H2V1:
fix->type = FB_TYPE_INTERLEAVED_PLANES;
fix->xpanstep = 2;
--
2.24.1