mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-29 10:46:25 +00:00
igt_kms: Add a way to query of the plane supports rotation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
143c3a7575
commit
b2eb48576f
@ -696,6 +696,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
|
|||||||
/* add the planes that can be used with that pipe */
|
/* add the planes that can be used with that pipe */
|
||||||
for (j = 0; j < plane_resources->count_planes; j++) {
|
for (j = 0; j < plane_resources->count_planes; j++) {
|
||||||
drmModePlane *drm_plane;
|
drmModePlane *drm_plane;
|
||||||
|
uint64_t prop_value;
|
||||||
|
|
||||||
drm_plane = drmModeGetPlane(display->drm_fd,
|
drm_plane = drmModeGetPlane(display->drm_fd,
|
||||||
plane_resources->planes[j]);
|
plane_resources->planes[j]);
|
||||||
@ -736,6 +737,12 @@ void igt_display_init(igt_display_t *display, int drm_fd)
|
|||||||
|
|
||||||
plane->pipe = pipe;
|
plane->pipe = pipe;
|
||||||
plane->drm_plane = drm_plane;
|
plane->drm_plane = drm_plane;
|
||||||
|
|
||||||
|
get_plane_property(display, drm_plane->plane_id,
|
||||||
|
"rotation",
|
||||||
|
&plane->rotation_property,
|
||||||
|
&prop_value);
|
||||||
|
plane->rotation = (igt_rotation_t)prop_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (display->has_universal_planes) {
|
if (display->has_universal_planes) {
|
||||||
|
@ -148,8 +148,10 @@ typedef struct {
|
|||||||
/*< private >*/
|
/*< private >*/
|
||||||
igt_pipe_t *pipe;
|
igt_pipe_t *pipe;
|
||||||
int index;
|
int index;
|
||||||
|
/* capabilities */
|
||||||
unsigned int is_primary : 1;
|
unsigned int is_primary : 1;
|
||||||
unsigned int is_cursor : 1;
|
unsigned int is_cursor : 1;
|
||||||
|
/* state tracking */
|
||||||
unsigned int fb_changed : 1;
|
unsigned int fb_changed : 1;
|
||||||
unsigned int position_changed : 1;
|
unsigned int position_changed : 1;
|
||||||
unsigned int panning_changed : 1;
|
unsigned int panning_changed : 1;
|
||||||
@ -159,6 +161,9 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
drmModePlane *drm_plane;
|
drmModePlane *drm_plane;
|
||||||
struct igt_fb *fb;
|
struct igt_fb *fb;
|
||||||
|
|
||||||
|
uint32_t rotation_property;
|
||||||
|
|
||||||
/* position within pipe_src_w x pipe_src_h */
|
/* position within pipe_src_w x pipe_src_h */
|
||||||
int crtc_x, crtc_y;
|
int crtc_x, crtc_y;
|
||||||
/* panning offset within the fb */
|
/* panning offset within the fb */
|
||||||
@ -210,6 +215,11 @@ drmModeModeInfo *igt_output_get_mode(igt_output_t *output);
|
|||||||
void igt_output_set_pipe(igt_output_t *output, enum pipe pipe);
|
void igt_output_set_pipe(igt_output_t *output, enum pipe pipe);
|
||||||
igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane plane);
|
igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane plane);
|
||||||
|
|
||||||
|
static inline bool igt_plane_supports_rotation(igt_plane_t *plane)
|
||||||
|
{
|
||||||
|
return plane->rotation_property != 0;
|
||||||
|
}
|
||||||
|
|
||||||
void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb);
|
void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb);
|
||||||
void igt_plane_set_position(igt_plane_t *plane, int x, int y);
|
void igt_plane_set_position(igt_plane_t *plane, int x, int y);
|
||||||
void igt_plane_set_panning(igt_plane_t *plane, int x, int y);
|
void igt_plane_set_panning(igt_plane_t *plane, int x, int y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user