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

@ -51,6 +51,8 @@ SOFTWARE.
#include "regionstr.h"
#include "privates.h"
#include "damage.h"
#include <X11/extensions/randr.h>
#include "picturestr.h"
typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */
@ -91,6 +93,9 @@ typedef struct _PixmapDirtyUpdate {
DamagePtr damage;
struct xorg_list ent;
int dst_x, dst_y;
Rotation rotation;
PictTransform transform;
struct pixman_f_transform f_transform, f_inverse;
} PixmapDirtyUpdateRec;
static inline void