Re: [PATCH] modesetting: Fix 16 bit depth/bpp mode
On Mon, 2017-01-02 at 14:42 -0500, Adam Jackson wrote: > On Thu, 2016-12-22 at 15:41 +0100, Stefan Agner wrote: > > When setting DefaultDepth to 16 in the Screen section, the current > > code requests a 32 bpp framebuffer, however the X-Server seems to > > assumes 16 bpp. > > > > Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp > > conversion in shadow update") > > > > Signed-off-by: Stefan Agner > > --- > > Observed this issue using X-Server/modesetting 1.18.4 and the FSL > > DCU DRM driver, but I am pretty sure it is driver independent. Not > > sure if the change is properly taking care of the corner case which > > was initially targetted, but it makes specifiying DefaultDepth with > > values of 16/24/32 and not specifiying it work for me. > > Without this patch, what path do you end up taking through > drmmode_get_default_bpp() ? I'm a little suspicious of the error > handling in that function. Enh, not worth caring that much. This is correct, merged: remote: remote: I: patch #129230 updated using rev 1c7f34e99ff9750979a03ae20c6be1f2b42c284c. remote: remote: I: 1 patch(es) updated to state Accepted. remote: To ssh://kemper.freedesktop.org/git/xorg/xserver remote:d95a1310e..1c7f34e99 1c7f34e99ff9750979a03ae20c6be1f2b42c284c -> master To ssh://gitlab.freedesktop.org/xorg/xserver d95a1310ef..1c7f34e99f master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] modesetting: Fix 16 bit depth/bpp mode
On Thu, 2016-12-22 at 15:41 +0100, Stefan Agner wrote: > When setting DefaultDepth to 16 in the Screen section, the current > code requests a 32 bpp framebuffer, however the X-Server seems to > assumes 16 bpp. > > Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp > conversion in shadow update") > > Signed-off-by: Stefan Agner > --- > Observed this issue using X-Server/modesetting 1.18.4 and the FSL > DCU DRM driver, but I am pretty sure it is driver independent. Not > sure if the change is properly taking care of the corner case which > was initially targetted, but it makes specifiying DefaultDepth with > values of 16/24/32 and not specifiying it work for me. Without this patch, what path do you end up taking through drmmode_get_default_bpp() ? I'm a little suspicious of the error handling in that function. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] modesetting: Fix 16 bit depth/bpp mode
When setting DefaultDepth to 16 in the Screen section, the current code requests a 32 bpp framebuffer, however the X-Server seems to assumes 16 bpp. Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp conversion in shadow update") Signed-off-by: Stefan Agner --- Observed this issue using X-Server/modesetting 1.18.4 and the FSL DCU DRM driver, but I am pretty sure it is driver independent. Not sure if the change is properly taking care of the corner case which was initially targetted, but it makes specifiying DefaultDepth with values of 16/24/32 and not specifiying it work for me. hw/xfree86/drivers/modesetting/driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 14f80b36c..45804df05 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -832,7 +832,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) "Using 24bpp hw front buffer with 32bpp shadow\n"); defaultbpp = 32; } else { -ms->drmmode.kbpp = defaultbpp; +ms->drmmode.kbpp = 0; } bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb; @@ -852,6 +852,8 @@ PreInit(ScrnInfoPtr pScrn, int flags) return FALSE; } xf86PrintDepthBpp(pScrn); +if (!ms->drmmode.kbpp) +ms->drmmode.kbpp = pScrn->bitsPerPixel; /* Process the options */ xf86CollectOptions(pScrn, NULL); -- 2.11.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel