[PATCH xserver 08/11] shadow: Lift 32->24 conversion from modesetting to dix
Adam Jackson
ajax at redhat.com
Fri Dec 9 19:52:35 UTC 2016
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/drivers/modesetting/Makefile.am | 2 --
hw/xfree86/drivers/modesetting/driver.c | 7 +++----
hw/xfree86/drivers/modesetting/sh3224.h | 7 -------
miext/shadow/Makefile.am | 1 +
{hw/xfree86/drivers/modesetting => miext/shadow}/sh3224.c | 8 +++-----
miext/shadow/shadow.h | 3 +++
6 files changed, 10 insertions(+), 18 deletions(-)
delete mode 100644 hw/xfree86/drivers/modesetting/sh3224.h
rename {hw/xfree86/drivers/modesetting => miext/shadow}/sh3224.c (96%)
diff --git a/hw/xfree86/drivers/modesetting/Makefile.am b/hw/xfree86/drivers/modesetting/Makefile.am
index 44823b0..e0411ef 100644
--- a/hw/xfree86/drivers/modesetting/Makefile.am
+++ b/hw/xfree86/drivers/modesetting/Makefile.am
@@ -51,8 +51,6 @@ modesetting_drv_la_SOURCES = \
dumb_bo.c \
dumb_bo.h \
present.c \
- sh3224.c \
- sh3224.h \
vblank.c \
pageflip.c \
$(NULL)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 3da69a3..a27b327 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -60,7 +60,6 @@
#endif
#include "driver.h"
-#include "sh3224.h"
static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y);
static Bool CloseScreen(ScreenPtr pScreen);
@@ -1124,7 +1123,7 @@ msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
modesettingPtr ms = modesettingPTR(pScrn);
- Bool use_ms_shadow = ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32;
+ Bool use_3224 = ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32;
if (ms->drmmode.shadow_enable2 && ms->drmmode.shadow_fb2) do {
RegionPtr damage = DamageRegion(pBuf->pDamage), tiles;
@@ -1166,8 +1165,8 @@ msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
free(prect);
} while (0);
- if (use_ms_shadow)
- ms_shadowUpdate32to24(pScreen, pBuf);
+ if (use_3224)
+ shadowUpdate32to24(pScreen, pBuf);
else
shadowUpdatePacked(pScreen, pBuf);
}
diff --git a/hw/xfree86/drivers/modesetting/sh3224.h b/hw/xfree86/drivers/modesetting/sh3224.h
deleted file mode 100644
index fc301f9..0000000
--- a/hw/xfree86/drivers/modesetting/sh3224.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef SH3224_H
-#define SH3224_H
-
-void
-ms_shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf);
-
-#endif
diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 27cf414..b611c9b 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -10,6 +10,7 @@ libshadow_la_SOURCES = \
c2p_core.h \
shadow.c \
shadow.h \
+ sh3224.c \
shafb4.c \
shafb8.c \
shalloc.c \
diff --git a/hw/xfree86/drivers/modesetting/sh3224.c b/miext/shadow/sh3224.c
similarity index 96%
rename from hw/xfree86/drivers/modesetting/sh3224.c
rename to miext/shadow/sh3224.c
index a64a103..ba54121 100644
--- a/hw/xfree86/drivers/modesetting/sh3224.c
+++ b/miext/shadow/sh3224.c
@@ -1,5 +1,4 @@
/*
- *
* Copyright © 2000 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -25,10 +24,9 @@
#include "dix-config.h"
#endif
-#include "shadow.h"
-#include "fb.h"
+#include "shadow.h"
+#include "fb.h"
-#include "sh3224.h"
#define Get8(a) ((CARD32) READ(a))
#if BITMAP_BIT_ORDER == MSBFirst
@@ -100,7 +98,7 @@ sh24_32BltLine(CARD8 *srcLine,
}
void
-ms_shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf)
+shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf)
{
RegionPtr damage = shadowDamage(pBuf);
PixmapPtr pShadow = pBuf->pPixmap;
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index 7f22169..0bbbe45 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -156,6 +156,9 @@ extern _X_EXPORT void
extern _X_EXPORT void
shadowUpdateRotate32(ScreenPtr pScreen, shadowBufPtr pBuf);
+extern _X_EXPORT void
+ shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf);
+
typedef void (*shadowUpdateProc) (ScreenPtr, shadowBufPtr);
extern _X_EXPORT shadowUpdateProc shadowUpdatePackedWeak(void);
--
2.9.3
More information about the xorg-devel
mailing list