[openchrome-devel] xf86-video-openchrome: 2 commits - src/via_driver.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Tue Jul 2 00:36:14 UTC 2019
src/via_driver.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 787fe8d2496c95769a44293363b0974f6703cf46
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 1 19:29:30 2019 -0500
Declare VIAGetRec as a static type function
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 3b5520b..bc595dc 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -727,7 +727,7 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn)
return TRUE;
}
-Bool
+static Bool
VIAGetRec(ScrnInfoPtr pScrn)
{
Bool ret = FALSE;
commit 67cdc36a684bf99b8f190df124ca16ebae2e23a9
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 1 19:26:57 2019 -0500
Declare pointer variables before use inside via_driver.c
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 645c979..3b5520b 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -425,12 +425,13 @@ static void
VIAFreeRec(ScrnInfoPtr pScrn)
{
VIAPtr pVia = VIAPTR(pScrn);
+ VIADisplayPtr pVIADisplay;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAFreeRec\n"));
if (!pScrn->driverPrivate)
return;
- VIADisplayPtr pVIADisplay = pVia->pVIADisplay;
+ pVIADisplay = pVia->pVIADisplay;
if (pVIADisplay) {
if (pVIADisplay->TVI2CDev)
@@ -731,6 +732,7 @@ VIAGetRec(ScrnInfoPtr pScrn)
{
Bool ret = FALSE;
VIAPtr pVia;
+ VIADisplayPtr pVIADisplay;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAGetRec\n"));
@@ -741,7 +743,7 @@ VIAGetRec(ScrnInfoPtr pScrn)
pVia = (VIARec *) xnfcalloc(sizeof(VIARec), 1);
if (pVia) {
pVia->pVIADisplay = xnfcalloc(sizeof(VIADisplayRec), 1);
- VIADisplayPtr pVIADisplay = pVia->pVIADisplay;
+ pVIADisplay = pVia->pVIADisplay;
if (pVIADisplay) {
pVIADisplay->TVI2CDev = NULL;
@@ -797,11 +799,11 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
drmmode_ptr drmmode = drmmode_crtc->drmmode;
struct buffer_object *old_front = NULL;
Bool ret;
- ScreenPtr screen = xf86ScrnToScreen(scrn);
+ ScreenPtr screen;
uint32_t old_fb_id;
int i, pitch, old_width, old_height, old_pitch;
int cpp = (scrn->bitsPerPixel + 7) / 8;
- PixmapPtr ppix = screen->GetScreenPixmap(screen);;
+ PixmapPtr ppix;
void *new_pixels;
VIAPtr pVia = VIAPTR(scrn);
xf86CrtcPtr crtc = NULL;
@@ -810,6 +812,9 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
DEBUG(xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Entered %s.\n", __func__));
+ screen = xf86ScrnToScreen(scrn);
+ ppix = screen->GetScreenPixmap(screen);
+
if ((scrn->virtualX == width) && (scrn->virtualY == height)) {
DEBUG(xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Exiting %s.\n", __func__));
More information about the openchrome-devel
mailing list