Re: [PATCH 6/5] On screen resize, clear the new buffer before displaying it

2015-04-22 Thread Alex Deucher
On Wed, Apr 22, 2015 at 5:45 AM, Michel Dänzer mic...@daenzer.net wrote:
 From: Michel Dänzer michel.daen...@amd.com

 Fixes garbage being intermittently visible during a screen resize.

 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27757#c7
 Signed-off-by: Michel Dänzer michel.daen...@amd.com

Reviewed-by: Alex Deucher alexander.deuc...@amd.com

 ---
  src/drmmode_display.c| 23 ---
  src/radeon.h |  1 +
  src/radeon_glamor_wrappers.c |  9 +
  3 files changed, 30 insertions(+), 3 deletions(-)

 diff --git a/src/drmmode_display.c b/src/drmmode_display.c
 index 326d863..5af5900 100644
 --- a/src/drmmode_display.c
 +++ b/src/drmmode_display.c
 @@ -1766,6 +1766,9 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, 
 int height)
 uint32_t tiling_flags = 0, base_align;
 PixmapPtr ppix = screen-GetScreenPixmap(screen);
 void *fb_shadow;
 +   xRectangle rect;
 +   Bool force;
 +   GCPtr gc;

 if (scrn-virtualX == width  scrn-virtualY == height)
 return TRUE;
 @@ -1909,6 +1912,23 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, 
 int height)
 scrn-pixmapPrivate.ptr = ppix-devPrivate.ptr;
  #endif

 +   if (info-use_glamor)
 +   radeon_glamor_create_screen_resources(scrn-pScreen);
 +
 +   /* Clear new buffer */
 +   gc = GetScratchGC(ppix-drawable.depth, scrn-pScreen);
 +   force = info-accel_state-force;
 +   info-accel_state-force = TRUE;
 +   ValidateGC(ppix-drawable, gc);
 +   rect.x = 0;
 +   rect.y = 0;
 +   rect.width = width;
 +   rect.height = height;
 +   (*gc-ops-PolyFillRect)(ppix-drawable, gc, 1, rect);
 +   FreeScratchGC(gc);
 +   info-accel_state-force = force;
 +   radeon_cs_flush_indirect(scrn);
 +
 for (i = 0; i  xf86_config-num_crtc; i++) {
 xf86CrtcPtr crtc = xf86_config-crtc[i];

 @@ -1919,9 +1939,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, 
 int height)
crtc-rotation, crtc-x, crtc-y);
 }

 -   if (info-use_glamor)
 -   radeon_glamor_create_screen_resources(scrn-pScreen);
 -
 if (old_fb_id)
 drmModeRmFB(drmmode-fd, old_fb_id);
 if (old_front)
 diff --git a/src/radeon.h b/src/radeon.h
 index cd03d53..7feed04 100644
 --- a/src/radeon.h
 +++ b/src/radeon.h
 @@ -544,6 +544,7 @@ typedef struct {
 CreateGCProcPtr SavedCreateGC;
 RegionPtr (*SavedCopyArea)(DrawablePtr, DrawablePtr, GCPtr, int, int,
int, int, int, int);
 +   void (*SavedPolyFillRect)(DrawablePtr, GCPtr, int, xRectangle*);
 CloseScreenProcPtr SavedCloseScreen;
 GetImageProcPtr SavedGetImage;
 GetSpansProcPtr SavedGetSpans;
 diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c
 index db2e85f..7a57bc1 100644
 --- a/src/radeon_glamor_wrappers.c
 +++ b/src/radeon_glamor_wrappers.c
 @@ -421,9 +421,17 @@ radeon_glamor_poly_fill_rect(DrawablePtr pDrawable, 
 GCPtr pGC,
  int nrect, xRectangle *prect)
  {
 ScrnInfoPtr scrn = xf86ScreenToScrn(pDrawable-pScreen);
 +   RADEONInfoPtr info = RADEONPTR(scrn);
 PixmapPtr pixmap = get_drawable_pixmap(pDrawable);
 struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);

 +   if ((info-accel_state-force || (priv  !priv-bo)) 
 +   radeon_glamor_prepare_access_gpu(priv)) {
 +   info-glamor.SavedPolyFillRect(pDrawable, pGC, nrect, prect);
 +   radeon_glamor_finish_access_gpu_rw(info, priv);
 +   return;
 +   }
 +
 if (radeon_glamor_prepare_access_cpu_rw(scrn, pixmap, priv)) {
 if (radeon_glamor_prepare_access_gc(scrn, pGC)) {
 fbPolyFillRect(pDrawable, pGC, nrect, prect);
 @@ -622,6 +630,7 @@ radeon_glamor_validate_gc(GCPtr pGC, unsigned long 
 changes, DrawablePtr pDrawabl

 glamor_validate_gc(pGC, changes, pDrawable);
 info-glamor.SavedCopyArea = pGC-ops-CopyArea;
 +   info-glamor.SavedPolyFillRect = pGC-ops-PolyFillRect;

 if (radeon_get_pixmap_private(get_drawable_pixmap(pDrawable)) ||
 (pGC-stipple  radeon_get_pixmap_private(pGC-stipple)) ||
 --
 2.1.4

 ___
 xorg-driver-ati mailing list
 xorg-driver-ati@lists.x.org
 http://lists.x.org/mailman/listinfo/xorg-driver-ati
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] DRI2: Clear old-devPrivate.ptr in fixup_glamor

2015-04-22 Thread Alex Deucher
On Wed, Apr 22, 2015 at 5:43 AM, Michel Dänzer mic...@daenzer.net wrote:
 From: Michel Dänzer michel.daen...@amd.com

 It doesn't point to the memory of the newly allocated BO. Fixes crash
 running piglit with Option ShadowPrimary enabled.

 Signed-off-by: Michel Dänzer michel.daen...@amd.com

Reviewed-by: Alex Deucher alexander.deuc...@amd.com

 ---
  src/radeon_dri2.c | 1 +
  1 file changed, 1 insertion(+)

 diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
 index 31a1ce7..6bb3dc6 100644
 --- a/src/radeon_dri2.c
 +++ b/src/radeon_dri2.c
 @@ -119,6 +119,7 @@ static PixmapPtr fixup_glamor(DrawablePtr drawable, 
 PixmapPtr pixmap)
0, 0,
pixmap-devKind,
NULL);
 +   old-devPrivate.ptr = NULL;

 screen-DestroyPixmap(pixmap);

 --
 2.1.4

 ___
 xorg-driver-ati mailing list
 xorg-driver-ati@lists.x.org
 http://lists.x.org/mailman/listinfo/xorg-driver-ati
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 52330] Triple monitor desktop intermittent slow updates

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=52330

--- Comment #7 from Michel Dänzer mic...@daenzer.net ---
With current xf86-video-ati Git master, does enabling the following options in
/etc/X11/xorg.conf help?

 Option AccelMethod glamor
 Option ShadowPrimary
 Option TearFree

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 55296] [KMS] Extremely low performance of XDrawImageString

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=55296

--- Comment #1 from Michel Dänzer mic...@daenzer.net ---
With current versions of the X server and driver, does Option AccelMethod
glamor help?

If that's still bad, with current xf86-video-ati Git master, does Option
ShadowPrimary help? (I recommend enabling Option TearFree along with that)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 73514] Slow performance with bochs

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73514

--- Comment #8 from Michel Dänzer mic...@daenzer.net ---
With current xf86-video-ati Git master, does Option ShadowPrimary help? (I
recommend enabling Option TearFree as well)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 26625] Really slow microsoft visio (wine)

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=26625

--- Comment #7 from Michel Dänzer mic...@daenzer.net ---
With current xf86-video-ati Git master, does enabling the following options in
/etc/X11/xorg.conf help?

 Option AccelMethod glamor
 Option ShadowPrimary
 Option TearFree

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 90151] New: Laptop Backlight Issue with Hybrid Graphics System

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90151

Bug ID: 90151
   Summary: Laptop Backlight Issue with Hybrid Graphics System
   Product: xorg
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Driver/Radeon
  Assignee: xorg-driver-ati@lists.x.org
  Reporter: k.sarendran...@gmail.com
QA Contact: xorg-t...@lists.x.org

Kernel Version: 3.19.3
Radeon Version: 1:7.5.0-2
Xorg Verison: 1.17.1-5


The system being used is a Lenovo Thinkpad configured with an R7 M260DX
discrete card attached to an A10-7300. Upon booting it, the kernel spits out
this message:


[drm:radeon_acpi_init [radeon]] *ERROR* Cannot find a backlight controller


with the quirk of having the brightness hotkeys not being able to control the
brightness. Looking into the radeon source, here is where the call came from
(radeon_acpi.c):


atif-encoder_for_bl = target;
if (!target) {
/* Brightness change notification is enabled, but we
 * didn't find a backlight controller, this should
 * never happen.
 */
DRM_ERROR(Cannot find a backlight controller\n);
}

Is this an issue within the driver or from Lenovo's acpi implementation?

If anything, I can control the backlight by using the /sys/ subsystem so I can
remap the hotkeys to control the brightness while systemd will store it on
reboot. In essence, I just wanted to bring this to attention due to the comment
in the source.

Also a quick question on hybrid graphics, the radeon feature matrix states that
Enduro is mostly complete and I believe that this lenovo system is muxless.
Checking vgaswitcheroo, the integrated card is used while the discrete card is
DynOff which I presume is dynamically off. Does that mean the driver is
currently powering on the discrete card when rendering is required? Or is
something else required?

Thanks for any answers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 27757] garbage on x startup for 1-2 seconds

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27757

Michel Dänzer mic...@daenzer.net changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Michel Dänzer mic...@daenzer.net ---
Should be fixed with the two commits below.

commit 673e1c7637687c74fc9bdeeeffb7ace0d04b734f
Author: Michel Dänzer michel.daen...@amd.com
Date:   Thu Apr 2 17:54:33 2015 +0900

Defer initial modeset until the first BlockHandler invocation

This ensures that the screen pixmap contents have been initialized when
the initial modes are set.

commit 80f3d727f93cb6efedd2b39338d2301035965fe2
Author: Michel Dänzer michel.daen...@amd.com
Date:   Wed Apr 22 13:33:15 2015 +0900

On screen resize, clear the new buffer before displaying it

Fixes garbage being intermittently visible during a screen resize.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 85921] Scrolling in LibreOffice Impress with enabled grid is very sluggish (EXA)

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85921

Michel Dänzer mic...@daenzer.net changed:

   What|Removed |Added

 Attachment #108968|text/plain  |application/vnd.oasis.opend
  mime type||ocument.presentation

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 28992] 2d is extremely slow with kwin-compositing (bisected)

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28992

--- Comment #1 from Michel Dänzer mic...@daenzer.net ---
Is this still an issue with current software versions?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH 0/5] Smoother startup

2015-04-22 Thread Alex Deucher
On Tue, Apr 21, 2015 at 5:49 AM, Michel Dänzer mic...@daenzer.net wrote:
 These patches make the Xorg startup smoother in two ways:

 * Make sure the contents of the buffers being scanned out have been
   initialized when the initial modes are set

 * Make the -background none command line option work as intended with
   glamor as well

 The patches apply on top of the 'Add Option TearFree' patch and are
 also available on the master branch of
 git://people.freedesktop.org/~daenzer/xf86-video-ati .

For the series:
Reviewed-by: Alex Deucher alexander.deuc...@amd.com


 [PATCH 1/5] Only copy fbcon BO contents if bgNoneRoot is TRUE
 [PATCH 2/5] Defer initial drmmode_copy_fb call until root window
 [PATCH 3/5] Defer initial modeset until the first BlockHandler
 [PATCH 4/5] Update scanout pixmap contents before setting a mode with
 [PATCH 5/5] Make drmmode_copy_fb() work with glamor as well
 ___
 xorg-driver-ati mailing list
 xorg-driver-ati@lists.x.org
 http://lists.x.org/mailman/listinfo/xorg-driver-ati
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[PATCH] DRI2: Clear old-devPrivate.ptr in fixup_glamor

2015-04-22 Thread Michel Dänzer
From: Michel Dänzer michel.daen...@amd.com

It doesn't point to the memory of the newly allocated BO. Fixes crash
running piglit with Option ShadowPrimary enabled.

Signed-off-by: Michel Dänzer michel.daen...@amd.com
---
 src/radeon_dri2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 31a1ce7..6bb3dc6 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -119,6 +119,7 @@ static PixmapPtr fixup_glamor(DrawablePtr drawable, 
PixmapPtr pixmap)
   0, 0,
   pixmap-devKind,
   NULL);
+   old-devPrivate.ptr = NULL;
 
screen-DestroyPixmap(pixmap);
 
-- 
2.1.4

___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 89233] Very slow Xorg performace when drawing Qt5's QPainter

2015-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89233

--- Comment #5 from Michel Dänzer mic...@daenzer.net ---
Is it better with current xf86-video-ati Git master and Option ShadowPrimary?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati