xf86-video-intel: man/intel.man src/intel_options.c src/intel_options.h src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Aug 25 05:53:33 PDT 2015


 man/intel.man         |    9 +++++++++
 src/intel_options.c   |    1 +
 src/intel_options.h   |    1 +
 src/sna/sna_display.c |    2 ++
 4 files changed, 13 insertions(+)

New commits:
commit 300319e2044cb1050e9cbc49c9985b995eaca5fe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Aug 25 13:47:24 2015 +0100

    intel: Add an Option for disabling native rotation
    
    Just in case we want to debug the native vs software paths and allow
    switching without recompiling.  For the unfortunate
    
    Section "Device"
    	Identifier "igfx"
    	Driver "intel"
    	Option "HWRotation" "off"
    EndSection
    
    default is for us to use HW rotation where available (for speed, reduced
    resource usage and reduce power usage).
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/man/intel.man b/man/intel.man
index 07ff1be..aa0eb6f 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -235,6 +235,15 @@ i.e. perform synchronous rendering.
 .IP
 Default: Disabled
 .TP
+.BI "Option \*qHWRotation\*q \*q" boolean \*q
+Override the use of native hardware rotation and force the use of software,
+but GPU accelerated where possible, rotation. On some platforms the hardware
+can scanout directly into a rotated output bypassing the intermediate rendering
+and extra allocations required for software implemented rotation (i.e. native
+rotation uses less resources, is quicker and uses less power). This allows you
+to disable the native rotation in case of errors.
+.IP
+Default: Enabled (use hardware rotation)
 .TP
 .BI "Option \*qVSync\*q \*q" boolean \*q
 This option controls the use of commands to synchronise rendering with the
diff --git a/src/intel_options.c b/src/intel_options.c
index 783de8a..d19736b 100644
--- a/src/intel_options.c
+++ b/src/intel_options.c
@@ -19,6 +19,7 @@ const OptionInfoRec intel_options[] = {
 	{OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	0},
 	{OPTION_TILING_2D,	"Tiling",	OPTV_BOOLEAN,	{0},	1},
 	{OPTION_TILING_FB,	"LinearFramebuffer",	OPTV_BOOLEAN,	{0},	0},
+	{OPTION_ROTATION,	"HWRotation",	OPTV_BOOLEAN,	{0},	1},
 	{OPTION_VSYNC,		"VSync",	OPTV_BOOLEAN,	{0},	1},
 	{OPTION_PAGEFLIP,	"PageFlip",	OPTV_BOOLEAN,	{0},	1},
 	{OPTION_SWAPBUFFERS_WAIT, "SwapbuffersWait", OPTV_BOOLEAN,	{0},	1},
diff --git a/src/intel_options.h b/src/intel_options.h
index 2941323..a831c55 100644
--- a/src/intel_options.h
+++ b/src/intel_options.h
@@ -22,6 +22,7 @@ enum intel_options {
 	OPTION_COLOR_KEY,
 	OPTION_TILING_2D,
 	OPTION_TILING_FB,
+	OPTION_ROTATION,
 	OPTION_VSYNC,
 	OPTION_PAGEFLIP,
 	OPTION_SWAPBUFFERS_WAIT,
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 08e9be5..34d19bb 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2878,6 +2878,8 @@ static int plane_details(struct sna *sna, struct plane *p)
 	}
 
 	p->rotation.supported &= DBG_NATIVE_ROTATION;
+	if (!xf86ReturnOptValBool(sna->Options, OPTION_ROTATION, TRUE))
+		p->rotation.supported = RR_Rotate_0;
 
 	if (props != (uint32_t *)stack_props)
 		free(props);


More information about the xorg-commit mailing list