prime: add rotation support for offloaded outputs (v2)

One of the lacking features with output offloading was
that screen rotation didn't work at all.

This patch makes 0/90/180/270 rotation work with USB output
and GPU outputs.

When it allocates the shared pixmap it allocates it rotated,
and any updates to the shared pixmap are done using a composite
path that does the rotation. The slave GPU then doesn't need
to know about the rotation and just displays the pixmap.

v2:
rewrite the sync dirty helper to use the dst pixmap, and
avoid any strange hobbits and rotations.

This breaks ABI in two places.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Dave Airlie 2015-06-30 14:54:42 +10:00 • committed by Keith Packard
commit 90db5edf11
8 changed files with 197 additions and 73 deletions

View file

@ -55,6 +55,7 @@ SOFTWARE.
#include <X11/Xproto.h>
#include "dix.h"
#include "privates.h"
#include <X11/extensions/randr.h>
typedef struct _PixmapFormat {
unsigned char depth;
@ -340,7 +341,9 @@ typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **);
typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *);
typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr,
int x, int y);
int x, int y,
int dst_x, int dst_y,
Rotation rotation);
typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr);