Skip to contentSkip to conversation

Misc fixes

PATCH In review Michel Dänzer 2 participants 5 messages Feb 21, 2017 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover Misc fixes

From: Michel Dänzer <[email protected]>

Miscellaneous fixes for minor problems I stumbled across while working on the previous series.

Michel Dänzer (3):
Use drmmode_crtc_scanout_free in drmmode_fini
present: Only call drmModeRmFB after setting modes for unflip
present: Wait for screen pixmap BO idle before setting modes for
unflip

 src/drmmode_display.c | 9 ++-------
 src/radeon_present.c  | 6 +++++-
 2 files changed, 7 insertions(+), 8 deletions(-)
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170221090340.10647-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

#2 lore raw

PATCH 1/3 Use drmmode_crtc_scanout_free in drmmode_fini

From: Michel Dänzer <[email protected]>

We were leaking drmmode_crtc->scanout_damage, which caused trouble on server reset. Fixes server reset with active separate scanout pixmaps.

---
 src/drmmode_display.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
src/drmmode_display.c +2 -7
index 5b0236da4..fd22a19ba 100644
@@ -2618,13 +2618,8 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 #endif
 	}
 
-	for (c = 0; c < config->num_crtc; c++) {
-		xf86CrtcPtr crtc = config->crtc[c];
-		drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
-		drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[0]);
-		drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[1]);
-	}
+	for (c = 0; c < config->num_crtc; c++)
+		drmmode_crtc_scanout_free(config->crtc[c]->driver_private);
 }
 
 
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw

PATCH 2/3 present: Only call drmModeRmFB after setting modes for unflip

In reply to a message not in the archive

From: Michel Dänzer <[email protected]>

Fixes display intermittently blanking when a modeset is used for unflip.

---
 src/radeon_present.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
src/radeon_present.c +3 -1
index 29800fec0..b36e29b19 100644
@@ -371,6 +371,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
     struct radeon_present_vblank_event *event;
     PixmapPtr pixmap = screen->GetScreenPixmap(screen);
     uint32_t handle;
+    int old_fb_id;
     int i;
 
     if (!radeon_present_check_unflip(scrn))
@@ -400,7 +401,7 @@ modeset:
     /* info->drmmode.fb_id still points to the FB for the last flipped BO.
      * Clear it, drmmode_set_mode_major will re-create it
      */
-    drmModeRmFB(info->drmmode.fd, info->drmmode.fb_id);
+    old_fb_id = info->drmmode.fb_id;
     info->drmmode.fb_id = 0;
 
     for (i = 0; i < config->num_crtc; i++) {
@@ -417,6 +418,7 @@ modeset:
 	    drmmode_crtc->need_modeset = TRUE;
     }
 
+    drmModeRmFB(info->drmmode.fd, old_fb_id);
     present_event_notify(event_id, 0, 0);
 
     info->drmmode.present_flipping = FALSE;
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#4 lore raw

PATCH 3/3 present: Wait for screen pixmap BO idle before setting modes for unflip

In reply to a message not in the archive

From: Michel Dänzer <[email protected]>

To make sure the screen pixmap contents are up to date when it starts being scanned out.

---
 src/radeon_present.c | 2 ++
 1 file changed, 2 insertions(+)
src/radeon_present.c +2 -0
index b36e29b19..1b0ddcb82 100644
@@ -404,6 +404,8 @@ modeset:
     old_fb_id = info->drmmode.fb_id;
     info->drmmode.fb_id = 0;
 
+    radeon_cs_flush_indirect(scrn);
+    radeon_bo_wait(info->front_bo);
     for (i = 0; i < config->num_crtc; i++) {
 	xf86CrtcPtr crtc = config->crtc[i];
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170221090340.10647-4-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by
#6 lore raw

Re: [PATCH xf86-video-ati 3/3] present: Wait for screen pixmap BO idle before setting modes for unflip

Quoted 6 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

To make sure the screen pixmap contents are up to date when it starts being scanned out.

Series is:

Quoted 20 lines
---
 src/radeon_present.c | 2 ++
 1 file changed, 2 insertions(+)
src/radeon_present.c +2 -1
index b36e29b19..1b0ddcb82 100644
@@ -404,6 +404,8 @@ modeset:
     old_fb_id = info->drmmode.fb_id;
     info->drmmode.fb_id = 0;
 
+    radeon_cs_flush_indirect(scrn);
+    radeon_bo_wait(info->front_bo);
     for (i = 0; i < config->num_crtc; i++) {
        xf86CrtcPtr crtc = config->crtc[i];
        drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
--

2.11.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx