drm: Add DRM_ROTATE_ and DRM_REFLECT_ defines to UAPI
Subsystems (3)
PATCH v2 1/1 drm: Add DRM_ROTATE_ and DRM_REFLECT_ defines to UAPI
Add DRM_ROTATE_ and DRM_REFLECT_ defines to the UAPI as a convenience.
Ideally the DRM_ROTATE_ and DRM_REFLECT_ property ids are looked up through the atomic API, but realizing that userspace is likely to take shortcuts and assume that the enum values are what is sent over the wire.
As a result these defines are provided purely as a convenience to userspace applications.
---
Changes since v1:
- Moved defines from drm.h to drm_mode.h
- Changed define prefix from DRM_ to DRM_MODE_PROP_
- Updated uses of the defines to the new prefix
- Removed include from drm_rect.c
- Stopped using the BIT() macro
drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_blend.c | 43 +++++++++---------- drivers/gpu/drm/drm_fb_helper.c | 4 +- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/drm_rect.c | 36 ++++++++-------- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- include/drm/drm_blend.h | 21 +--------- include/uapi/drm/drm_mode.h | 76 ++++++++++++++++++++++++++++++++++ 9 files changed, 124 insertions(+), 64 deletions(-)
drivers/gpu/drm/drm_atomic.c +1 -1
@@ -769,7 +769,7 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, }else if (property == config->prop_src_h) { state->src_h = val; }else if (property == plane->rotation_property) { -if (!is_power_of_2 (val &DRM_ROTATE_MASK )) +if (!is_power_of_2 (val &DRM_MODE_PROP_ROTATE_MASK ))return -EINVAL ; state->rotation = val; }else if (property == plane->zpos_property) {
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -3220,7 +3220,7 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)if (plane->state) { plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } }EXPORT_SYMBOL (drm_atomic_helper_plane_reset);
drivers/gpu/drm/drm_blend.c +22 -21
77 lines not on this page · raw message
drivers/gpu/drm/drm_fb_helper.c +2 -2
@@ -378,7 +378,7 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper) goto fail; } - plane_state->rotation =DRM_ROTATE_0 ; + plane_state->rotation =DRM_MODE_PROP_ROTATE_0 ; plane->old_fb = plane->fb; plane_mask |=1 <<drm_plane_index (plane);
@@ -431,7 +431,7 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)if (plane->rotation_property)drm_mode_plane_set_obj_prop (plane, plane->rotation_property, -DRM_ROTATE_0 ); +DRM_MODE_PROP_ROTATE_0 ); }for (i =0 ; i < fb_helper->crtc_count; i++) {
drivers/gpu/drm/drm_plane_helper.c +1 -1
@@ -336,7 +336,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ret =drm_plane_helper_check_update (plane, crtc, fb, &src, &dest, &clip, -DRM_ROTATE_0 , +DRM_MODE_PROP_ROTATE_0 ,DRM_PLANE_HELPER_NO_SCALING ,DRM_PLANE_HELPER_NO_SCALING , false, false, &visible);
drivers/gpu/drm/drm_rect.c +18 -18
@@ -310,38 +310,38 @@ void drm_rect_rotate(struct drm_rect *r, {struct drm_rect tmp; -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; } } -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2; r->y1 = width - tmp.x2; r->y2 = width - tmp.x1;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = height - tmp.y2; r->x2 = height - tmp.y1;
@@ -373,8 +373,8 @@ EXPORT_SYMBOL(drm_rect_rotate);* them when doing a rotatation and its inverse. * That is, if you do :: * -* drm_rotate(&r, width, height, rotation); -* drm_rotate_inv(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE_inv(&r, width, height, rotation); * * you will always get back the original rectangle. */
@@ -384,24 +384,24 @@ void drm_rect_rotate_inv(struct drm_rect *r, {struct drm_rect tmp; -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = width - tmp.y2; r->x2 = width - tmp.y1; r->y1 = tmp.x1; r->y2 = tmp.x2;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2;
@@ -412,15 +412,15 @@ void drm_rect_rotate_inv(struct drm_rect *r,break ; } -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; }
drivers/gpu/drm/nouveau/nv50_display.c +1 -1
@@ -1033,7 +1033,7 @@ nv50_wndw_reset(struct drm_plane *plane) plane->funcs->atomic_destroy_state (plane, plane->state); plane->state = &asyw->state; plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } static void
include/drm/drm_blend.h +2 -19
@@ -25,31 +25,14 @@#include <linux/list.h> #include <linux/ctype.h> +#include <drm/drm_mode.h> struct drm_device ;struct drm_atomic_state ; -/* -* Rotation property bits. DRM_ROTATE_<degrees> rotates the image by the -* specified amount in degrees in counter clockwise direction. DRM_REFLECT_X and -* DRM_REFLECT_Y reflects the image along the specified axis prior to rotation -* -* WARNING: These defines are UABI since they're exposed in the rotation -* property. -*/ -#define DRM_ROTATE_0 BIT(0) -#define DRM_ROTATE_90 BIT(1) -#define DRM_ROTATE_180 BIT(2) -#define DRM_ROTATE_270 BIT(3) -#define DRM_ROTATE_MASK (DRM_ROTATE_0 | DRM_ROTATE_90 | \ - DRM_ROTATE_180 | DRM_ROTATE_270) -#define DRM_REFLECT_X BIT(4) -#define DRM_REFLECT_Y BIT(5) -#define DRM_REFLECT_MASK (DRM_REFLECT_X | DRM_REFLECT_Y) -static inline bool drm_rotation_90_or_270 (unsigned int rotation) { -return rotation & (DRM_ROTATE_90 |DRM_ROTATE_270 ); +return rotation & (DRM_MODE_PROP_ROTATE_90 |DRM_MODE_PROP_ROTATE_270 ); } int drm_plane_create_rotation_property(struct drm_plane *plane,
include/uapi/drm/drm_mode.h +76 -0
82 lines not on this page · raw message
Signature · 6 lines
2.11.0.453.g787f75f05 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Robert Foss
Add
DRM_ROTATE_andDRM_REFLECT_defines to the UAPI as a convenience.Ideally the
DRM_ROTATE_andDRM_REFLECT_property ids are looked up through the atomic API, but realizing that userspace is likely to take shortcuts and assume that the enum values are what is sent over the wire.
Quoted 8 lines
As a result these defines are provided purely as a convenience to userspace applications.
Signed-off-by Robert Foss <[email protected]>---
Changes since v1:
- Moved defines fromdrm.htodrm_mode.h
- Changed define prefix fromDRM_toDRM_MODE_PROP_
DRM_MODE_PROP_ would potentially cause confusion with the prop types. DRM_MODE_ROTATE_ etc. could be acceptable I suppose.
Quoted 4 lines
- Updated uses of the defines to the new prefix
- Removed include fromdrm_rect.c
- Stopped using theBIT()macro
Quoted 9 lines
drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_blend.c | 43 +++++++++---------- drivers/gpu/drm/drm_fb_helper.c | 4 +- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/drm_rect.c | 36 ++++++++-------- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- include/drm/drm_blend.h | 21 +--------- include/uapi/drm/drm_mode.h | 76 ++++++++++++++++++++++++++++++++++
I'm pretty sure this won't even compile properly since it's missing all but one driver.
Quoted 315 lines
9 files changed, 124 insertions(+), 64 deletions(-)drivers/gpu/drm/drm_atomic.c +1
-1@@ -769,7 +769,7 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, }else if (property == config->prop_src_h) { state->src_h = val; }else if (property == plane->rotation_property) { -if (!is_power_of_2 (val &DRM_ROTATE_MASK )) +if (!is_power_of_2 (val &DRM_MODE_PROP_ROTATE_MASK ))return -EINVAL ; state->rotation = val; }else if (property == plane->zpos_property) {drivers/gpu/drm/drm_atomic_helper.c +1
-1@@ -3220,7 +3220,7 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)if (plane->state) { plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } }EXPORT_SYMBOL (drm_atomic_helper_plane_reset);drivers/gpu/drm/drm_blend.c +22
-21@@ -119,15 +119,15 @@* drm_property_create_bitmask()) called "rotation" and has the following * bitmask enumaration values: * -* DRM_ROTATE_0: +* DRM_MODE_PROP_ROTATE_0: * "rotate-0" -* DRM_ROTATE_90: +* DRM_MODE_PROP_ROTATE_90: * "rotate-90" -* DRM_ROTATE_180: +* DRM_MODE_PROP_ROTATE_180: * "rotate-180" -* DRM_ROTATE_270: +* DRM_MODE_PROP_ROTATE_270: * "rotate-270" -* DRM_REFLECT_X: +* DRM_MODE_PROP_REFLECT_X: * "reflect-x" * DRM_REFELCT_Y: * "reflect-y" @@ -142,17 +142,17 @@ int drm_plane_create_rotation_property(struct drm_plane *plane, unsigned int supported_rotations) {static const struct drm_prop_enum_list props[] = { - {__builtin_ffs (DRM_ROTATE_0 ) -1 ,"rotate-0" }, - {__builtin_ffs (DRM_ROTATE_90 ) -1 ,"rotate-90" }, - {__builtin_ffs (DRM_ROTATE_180 ) -1 ,"rotate-180" }, - {__builtin_ffs (DRM_ROTATE_270 ) -1 ,"rotate-270" }, - {__builtin_ffs (DRM_REFLECT_X ) -1 ,"reflect-x" }, - {__builtin_ffs (DRM_REFLECT_Y ) -1 ,"reflect-y" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_0 ) -1 ,"rotate-0" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_90 ) -1 ,"rotate-90" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_180 ) -1 ,"rotate-180" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_270 ) -1 ,"rotate-270" }, + {__builtin_ffs (DRM_MODE_PROP_REFLECT_X ) -1 ,"reflect-x" }, + {__builtin_ffs (DRM_MODE_PROP_REFLECT_Y ) -1 ,"reflect-y" }, };struct drm_property *prop; -WARN_ON ((supported_rotations &DRM_ROTATE_MASK ) ==0 ); -WARN_ON (!is_power_of_2 (rotation &DRM_ROTATE_MASK )); +WARN_ON ((supported_rotations &DRM_MODE_PROP_ROTATE_MASK ) ==0 ); +WARN_ON (!is_power_of_2 (rotation &DRM_MODE_PROP_ROTATE_MASK ));WARN_ON (rotation & ~supported_rotations); prop = drm_property_create_bitmask(plane->dev, 0, "rotation",@@ -178,14 +178,14 @@ EXPORT_SYMBOL(drm_plane_create_rotation_property);* @supported_rotations: Supported rotations * * Attempt to simplify the rotation to a form that is supported. -* Eg. if the hardware supports everything except DRM_REFLECT_X +* Eg. if the hardware supports everything except DRM_MODE_PROP_REFLECT_X * one could call this function like this: * -* drm_rotation_simplify(rotation, DRM_ROTATE_0 | -* DRM_ROTATE_90 | DRM_ROTATE_180 | -* DRM_ROTATE_270 | DRM_REFLECT_Y); +* drm_rotation_simplify(rotation, DRM_MODE_PROP_ROTATE_0 | +* DRM_MODE_PROP_ROTATE_90 | DRM_MODE_PROP_ROTATE_180 | +* DRM_MODE_PROP_ROTATE_270 | DRM_MODE_PROP_REFLECT_Y); * -* to eliminate the DRM_ROTATE_X flag. Depending on what kind of +* to eliminate the DRM_MODE_PROP_ROTATE_X flag. Depending on what kind of * transforms the hardware supports, this function may not * be able to produce a supported transform, so the caller should * check the result afterwards. @@ -194,9 +194,10 @@ unsigned int drm_rotation_simplify(unsigned int rotation, unsigned int supported_rotations) {if (rotation & ~supported_rotations) { - rotation ^=DRM_REFLECT_X |DRM_REFLECT_Y ; - rotation = (rotation &DRM_REFLECT_MASK ) | -BIT ((ffs (rotation &DRM_ROTATE_MASK ) +1 ) %4 ); + rotation ^=DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y ; + rotation = (rotation &DRM_MODE_PROP_REFLECT_MASK ) | +BIT ((ffs (rotation &DRM_MODE_PROP_ROTATE_MASK ) +1 ) + %4 ); }return rotation;drivers/gpu/drm/drm_fb_helper.c +2
-2@@ -378,7 +378,7 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper) goto fail; } - plane_state->rotation =DRM_ROTATE_0 ; + plane_state->rotation =DRM_MODE_PROP_ROTATE_0 ; plane->old_fb = plane->fb; plane_mask |=1 <<drm_plane_index (plane);@@ -431,7 +431,7 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)if (plane->rotation_property)drm_mode_plane_set_obj_prop (plane, plane->rotation_property, -DRM_ROTATE_0 ); +DRM_MODE_PROP_ROTATE_0 ); }for (i =0 ; i < fb_helper->crtc_count; i++) {drivers/gpu/drm/drm_plane_helper.c +1
-1@@ -336,7 +336,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ret =drm_plane_helper_check_update (plane, crtc, fb, &src, &dest, &clip, -DRM_ROTATE_0 , +DRM_MODE_PROP_ROTATE_0 ,DRM_PLANE_HELPER_NO_SCALING ,DRM_PLANE_HELPER_NO_SCALING , false, false, &visible);drivers/gpu/drm/drm_rect.c +18
-18@@ -310,38 +310,38 @@ void drm_rect_rotate(struct drm_rect *r, {struct drm_rect tmp; -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; } } -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2; r->y1 = width - tmp.x2; r->y2 = width - tmp.x1;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = height - tmp.y2; r->x2 = height - tmp.y1;@@ -373,8 +373,8 @@ EXPORT_SYMBOL(drm_rect_rotate);* them when doing a rotatation and its inverse. * That is, if you do :: * -* drm_rotate(&r, width, height, rotation); -* drm_rotate_inv(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE_inv(&r, width, height, rotation); * * you will always get back the original rectangle. */ @@ -384,24 +384,24 @@ void drm_rect_rotate_inv(struct drm_rect *r, {struct drm_rect tmp; -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = width - tmp.y2; r->x2 = width - tmp.y1; r->y1 = tmp.x1; r->y2 = tmp.x2;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2;@@ -412,15 +412,15 @@ void drm_rect_rotate_inv(struct drm_rect *r,break ; } -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; }drivers/gpu/drm/nouveau/nv50_display.c +1
-1@@ -1033,7 +1033,7 @@ nv50_wndw_reset(struct drm_plane *plane) plane->funcs->atomic_destroy_state (plane, plane->state); plane->state = &asyw->state; plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } static voidinclude/drm/drm_blend.h +2
-19@@ -25,31 +25,14 @@#include <linux/list.h> #include <linux/ctype.h> +#include <drm/drm_mode.h> struct drm_device ;struct drm_atomic_state ; -/* -* Rotation property bits. DRM_ROTATE_<degrees> rotates the image by the -* specified amount in degrees in counter clockwise direction. DRM_REFLECT_X and -* DRM_REFLECT_Y reflects the image along the specified axis prior to rotation -* -* WARNING: These defines are UABI since they're exposed in the rotation -* property. -*/ -#define DRM_ROTATE_0 BIT(0) -#define DRM_ROTATE_90 BIT(1) -#define DRM_ROTATE_180 BIT(2) -#define DRM_ROTATE_270 BIT(3) -#define DRM_ROTATE_MASK (DRM_ROTATE_0 | DRM_ROTATE_90 | \ - DRM_ROTATE_180 | DRM_ROTATE_270) -#define DRM_REFLECT_X BIT(4) -#define DRM_REFLECT_Y BIT(5) -#define DRM_REFLECT_MASK (DRM_REFLECT_X | DRM_REFLECT_Y) -static inline bool drm_rotation_90_or_270 (unsigned int rotation) { -return rotation & (DRM_ROTATE_90 |DRM_ROTATE_270 ); +return rotation & (DRM_MODE_PROP_ROTATE_90 |DRM_MODE_PROP_ROTATE_270 ); } int drm_plane_create_rotation_property(struct drm_plane *plane,include/uapi/drm/drm_mode.h +0
-0
include/uapi/drm/drm_mode.h extern "C" { · line 130
Quoted 4 lines
include/uapi/drm/drm_mode.h +1
-0@@ -127,6 +127,82 @@ extern "C" {#define DRM_MODE_LINK_STATUS_GOOD 0#define DRM_MODE_LINK_STATUS_BAD 1 +/** DRM_MODE_PROP_ROTATE_0
Is this supposed to be kernel-doc or something like that?
include/uapi/drm/drm_mode.h extern "C" { · line 132
Quoted 2 lines
include/uapi/drm/drm_mode.h +2
-0+* +* Signals that a drm plane has been rotated 0 degrees.
Past tense doesn't feel right to me. Maybe "is rotated"? But I'm not a native speaker so maybe it's just me.
include/uapi/drm/drm_mode.h extern "C" { · line 135
Quoted 3 lines
include/uapi/drm/drm_mode.h +3
-0+* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method.
Repeating this for every define seems redundant.
Quoted 36 lines
include/uapi/drm/drm_mode.h +36
-0+*/ +#define DRM_MODE_PROP_ROTATE_0 (1<<0) + +/** DRM_MODE_PROP_ROTATE_90 +* +* Signals that a drm plane has been rotated 90 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_90 (1<<1) + +/** DRM_MODE_PROP_ROTATE_180 +* +* Signals that a drm plane has been rotated 180 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_180 (1<<2) + +/** DRM_MODE_PROP_ROTATE_270 +* +* Signals that a drm plane has been rotated 270 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_270 (1<<3) + + +/** DRM_MODE_PROP_ROTATE_MASK +*
include/uapi/drm/drm_mode.h extern "C" { · line 181
Quoted 10 lines
include/uapi/drm/drm_mode.h +10
-0+* Bitmask used to look for drm plane rotations. +*/ +#define DRM_MODE_PROP_ROTATE_MASK (DRM_MODE_PROP_ROTATE_0 | \ + DRM_MODE_PROP_ROTATE_90 | \ + DRM_MODE_PROP_ROTATE_180 | \ + DRM_MODE_PROP_ROTATE_270) + +/** DRM_MODE_PROP_REFLECT_X +* +* Signals that a drm plane has been reflected in the X axis.
Seems more vague that what we had before.
Quoted 34 lines
include/uapi/drm/drm_mode.h +24
-0+* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_REFLECT_X (1<<4) + +/** DRM_MODE_PROP_REFLECT_Y +* +* Signals that a drm plane has been reflected in the Y axis. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_REFLECT_Y (1<<5) + + +/** DRM_MODE_PROP_REFLECT_MASK +* +* Bitmask used to look for drm plane reflections. +*/ +#define DRM_MODE_PROP_REFLECT_MASK (DRM_MODE_PROP_REFLECT_X \ + | DRM_MODE_PROP_REFLECT_Y) + +struct drm_mode_modeinfo {__u32 clock;__u16 hdisplay;Signature · 6 lines
2.11.0.453.g787f75f05 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 2 lines
Ville Syrjälä Intel OTC
Hey Ville,
Quoted 2 lines · Ville Syrjälä
Quoted 1 line · Robert Foss
Add
DRM_ROTATE_andDRM_REFLECT_defines to the UAPI as a convenience.
I just noticed this line using the wrong define names. Will fix in v3.
Quoted 32 lines
Quoted 6 lines
Ideally the
DRM_ROTATE_andDRM_REFLECT_property ids are looked up through the atomic API, but realizing that userspace is likely to take shortcuts and assume that the enum values are what is sent over the wire.Quoted 8 lines
As a result these defines are provided purely as a convenience to userspace applications.
Signed-off-by Robert Foss <[email protected]>---
Changes since v1:
- Moved defines fromdrm.htodrm_mode.h
- Changed define prefix fromDRM_toDRM_MODE_PROP_
DRM_MODE_PROP_would potentially cause confusion with the prop types.DRM_MODE_ROTATE_etc. could be acceptable I suppose.Quoted 4 lines
- Updated uses of the defines to the new prefix
- Removed include fromdrm_rect.c
- Stopped using theBIT()macroQuoted 9 lines
drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_blend.c | 43 +++++++++---------- drivers/gpu/drm/drm_fb_helper.c | 4 +- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/drm_rect.c | 36 ++++++++-------- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- include/drm/drm_blend.h | 21 +--------- include/uapi/drm/drm_mode.h | 76 ++++++++++++++++++++++++++++++++++
Quoted 2 lines
I'm pretty sure this won't even compile properly since it's missing all but one driver.
I did check it using an arbitrary Kconfig, but I also missed a ton of uses. Will fix in v3.
Quoted 319 lines
Quoted 319 lines
9 files changed, 124 insertions(+), 64 deletions(-)drivers/gpu/drm/drm_atomic.c +1
-1@@ -769,7 +769,7 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, }else if (property == config->prop_src_h) { state->src_h = val; }else if (property == plane->rotation_property) { -if (!is_power_of_2 (val &DRM_ROTATE_MASK )) +if (!is_power_of_2 (val &DRM_MODE_PROP_ROTATE_MASK ))return -EINVAL ; state->rotation = val; }else if (property == plane->zpos_property) {drivers/gpu/drm/drm_atomic_helper.c +1
-1@@ -3220,7 +3220,7 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)if (plane->state) { plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } }EXPORT_SYMBOL (drm_atomic_helper_plane_reset);drivers/gpu/drm/drm_blend.c +22
-21@@ -119,15 +119,15 @@* drm_property_create_bitmask()) called "rotation" and has the following * bitmask enumaration values: * -* DRM_ROTATE_0: +* DRM_MODE_PROP_ROTATE_0: * "rotate-0" -* DRM_ROTATE_90: +* DRM_MODE_PROP_ROTATE_90: * "rotate-90" -* DRM_ROTATE_180: +* DRM_MODE_PROP_ROTATE_180: * "rotate-180" -* DRM_ROTATE_270: +* DRM_MODE_PROP_ROTATE_270: * "rotate-270" -* DRM_REFLECT_X: +* DRM_MODE_PROP_REFLECT_X: * "reflect-x" * DRM_REFELCT_Y: * "reflect-y" @@ -142,17 +142,17 @@ int drm_plane_create_rotation_property(struct drm_plane *plane, unsigned int supported_rotations) {static const struct drm_prop_enum_list props[] = { - {__builtin_ffs (DRM_ROTATE_0 ) -1 ,"rotate-0" }, - {__builtin_ffs (DRM_ROTATE_90 ) -1 ,"rotate-90" }, - {__builtin_ffs (DRM_ROTATE_180 ) -1 ,"rotate-180" }, - {__builtin_ffs (DRM_ROTATE_270 ) -1 ,"rotate-270" }, - {__builtin_ffs (DRM_REFLECT_X ) -1 ,"reflect-x" }, - {__builtin_ffs (DRM_REFLECT_Y ) -1 ,"reflect-y" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_0 ) -1 ,"rotate-0" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_90 ) -1 ,"rotate-90" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_180 ) -1 ,"rotate-180" }, + {__builtin_ffs (DRM_MODE_PROP_ROTATE_270 ) -1 ,"rotate-270" }, + {__builtin_ffs (DRM_MODE_PROP_REFLECT_X ) -1 ,"reflect-x" }, + {__builtin_ffs (DRM_MODE_PROP_REFLECT_Y ) -1 ,"reflect-y" }, };struct drm_property *prop; -WARN_ON ((supported_rotations &DRM_ROTATE_MASK ) ==0 ); -WARN_ON (!is_power_of_2 (rotation &DRM_ROTATE_MASK )); +WARN_ON ((supported_rotations &DRM_MODE_PROP_ROTATE_MASK ) ==0 ); +WARN_ON (!is_power_of_2 (rotation &DRM_MODE_PROP_ROTATE_MASK ));WARN_ON (rotation & ~supported_rotations); prop = drm_property_create_bitmask(plane->dev, 0, "rotation",@@ -178,14 +178,14 @@ EXPORT_SYMBOL(drm_plane_create_rotation_property);* @supported_rotations: Supported rotations * * Attempt to simplify the rotation to a form that is supported. -* Eg. if the hardware supports everything except DRM_REFLECT_X +* Eg. if the hardware supports everything except DRM_MODE_PROP_REFLECT_X * one could call this function like this: * -* drm_rotation_simplify(rotation, DRM_ROTATE_0 | -* DRM_ROTATE_90 | DRM_ROTATE_180 | -* DRM_ROTATE_270 | DRM_REFLECT_Y); +* drm_rotation_simplify(rotation, DRM_MODE_PROP_ROTATE_0 | +* DRM_MODE_PROP_ROTATE_90 | DRM_MODE_PROP_ROTATE_180 | +* DRM_MODE_PROP_ROTATE_270 | DRM_MODE_PROP_REFLECT_Y); * -* to eliminate the DRM_ROTATE_X flag. Depending on what kind of +* to eliminate the DRM_MODE_PROP_ROTATE_X flag. Depending on what kind of * transforms the hardware supports, this function may not * be able to produce a supported transform, so the caller should * check the result afterwards. @@ -194,9 +194,10 @@ unsigned int drm_rotation_simplify(unsigned int rotation, unsigned int supported_rotations) {if (rotation & ~supported_rotations) { - rotation ^=DRM_REFLECT_X |DRM_REFLECT_Y ; - rotation = (rotation &DRM_REFLECT_MASK ) | -BIT ((ffs (rotation &DRM_ROTATE_MASK ) +1 ) %4 ); + rotation ^=DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y ; + rotation = (rotation &DRM_MODE_PROP_REFLECT_MASK ) | +BIT ((ffs (rotation &DRM_MODE_PROP_ROTATE_MASK ) +1 ) + %4 ); }return rotation;drivers/gpu/drm/drm_fb_helper.c +2
-2@@ -378,7 +378,7 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper) goto fail; } - plane_state->rotation =DRM_ROTATE_0 ; + plane_state->rotation =DRM_MODE_PROP_ROTATE_0 ; plane->old_fb = plane->fb; plane_mask |=1 <<drm_plane_index (plane);@@ -431,7 +431,7 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)if (plane->rotation_property)drm_mode_plane_set_obj_prop (plane, plane->rotation_property, -DRM_ROTATE_0 ); +DRM_MODE_PROP_ROTATE_0 ); }for (i =0 ; i < fb_helper->crtc_count; i++) {drivers/gpu/drm/drm_plane_helper.c +1
-1@@ -336,7 +336,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ret =drm_plane_helper_check_update (plane, crtc, fb, &src, &dest, &clip, -DRM_ROTATE_0 , +DRM_MODE_PROP_ROTATE_0 ,DRM_PLANE_HELPER_NO_SCALING ,DRM_PLANE_HELPER_NO_SCALING , false, false, &visible);drivers/gpu/drm/drm_rect.c +18
-18@@ -310,38 +310,38 @@ void drm_rect_rotate(struct drm_rect *r, {struct drm_rect tmp; -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; } } -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2; r->y1 = width - tmp.x2; r->y2 = width - tmp.x1;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = height - tmp.y2; r->x2 = height - tmp.y1;@@ -373,8 +373,8 @@ EXPORT_SYMBOL(drm_rect_rotate);* them when doing a rotatation and its inverse. * That is, if you do :: * -* drm_rotate(&r, width, height, rotation); -* drm_rotate_inv(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE(&r, width, height, rotation); +* DRM_MODE_PROP_ROTATE_inv(&r, width, height, rotation); * * you will always get back the original rectangle. */ @@ -384,24 +384,24 @@ void drm_rect_rotate_inv(struct drm_rect *r, {struct drm_rect tmp; -switch (rotation &DRM_ROTATE_MASK ) { -case DRM_ROTATE_0 : +switch (rotation &DRM_MODE_PROP_ROTATE_MASK ) { +case DRM_MODE_PROP_ROTATE_0 :break ; -case DRM_ROTATE_90 : +case DRM_MODE_PROP_ROTATE_90 : tmp = *r; r->x1 = width - tmp.y2; r->x2 = width - tmp.y1; r->y1 = tmp.x1; r->y2 = tmp.x2;break ; -case DRM_ROTATE_180 : +case DRM_MODE_PROP_ROTATE_180 : tmp = *r; r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; r->y1 = height - tmp.y2; r->y2 = height - tmp.y1;break ; -case DRM_ROTATE_270 : +case DRM_MODE_PROP_ROTATE_270 : tmp = *r; r->x1 = tmp.y1; r->x2 = tmp.y2;@@ -412,15 +412,15 @@ void drm_rect_rotate_inv(struct drm_rect *r,break ; } -if (rotation & (DRM_REFLECT_X |DRM_REFLECT_Y )) { +if (rotation & (DRM_MODE_PROP_REFLECT_X |DRM_MODE_PROP_REFLECT_Y )) { tmp = *r; -if (rotation &DRM_REFLECT_X ) { +if (rotation &DRM_MODE_PROP_REFLECT_X ) { r->x1 = width - tmp.x2; r->x2 = width - tmp.x1; } -if (rotation &DRM_REFLECT_Y ) { +if (rotation &DRM_MODE_PROP_REFLECT_Y ) { r->y1 = height - tmp.y2; r->y2 = height - tmp.y1; }drivers/gpu/drm/nouveau/nv50_display.c +1
-1@@ -1033,7 +1033,7 @@ nv50_wndw_reset(struct drm_plane *plane) plane->funcs->atomic_destroy_state (plane, plane->state); plane->state = &asyw->state; plane->state->plane = plane; - plane->state->rotation =DRM_ROTATE_0 ; + plane->state->rotation =DRM_MODE_PROP_ROTATE_0 ; } static voidinclude/drm/drm_blend.h +2
-19@@ -25,31 +25,14 @@#include <linux/list.h> #include <linux/ctype.h> +#include <drm/drm_mode.h> struct drm_device ;struct drm_atomic_state ; -/* -* Rotation property bits. DRM_ROTATE_<degrees> rotates the image by the -* specified amount in degrees in counter clockwise direction. DRM_REFLECT_X and -* DRM_REFLECT_Y reflects the image along the specified axis prior to rotation -* -* WARNING: These defines are UABI since they're exposed in the rotation -* property. -*/ -#define DRM_ROTATE_0 BIT(0) -#define DRM_ROTATE_90 BIT(1) -#define DRM_ROTATE_180 BIT(2) -#define DRM_ROTATE_270 BIT(3) -#define DRM_ROTATE_MASK (DRM_ROTATE_0 | DRM_ROTATE_90 | \ - DRM_ROTATE_180 | DRM_ROTATE_270) -#define DRM_REFLECT_X BIT(4) -#define DRM_REFLECT_Y BIT(5) -#define DRM_REFLECT_MASK (DRM_REFLECT_X | DRM_REFLECT_Y) -static inline bool drm_rotation_90_or_270 (unsigned int rotation) { -return rotation & (DRM_ROTATE_90 |DRM_ROTATE_270 ); +return rotation & (DRM_MODE_PROP_ROTATE_90 |DRM_MODE_PROP_ROTATE_270 ); } int drm_plane_create_rotation_property(struct drm_plane *plane,include/uapi/drm/drm_mode.h +0
-0@@ -127,6 +127,82 @@ extern "C" {#define DRM_MODE_LINK_STATUS_GOOD 0#define DRM_MODE_LINK_STATUS_BAD 1
Quoted 3 lines
include/uapi/drm/drm_mode.h extern "C" { · line 130
Quoted 1 line
include/uapi/drm/drm_mode.h +1
-0+/** DRM_MODE_PROP_ROTATE_0 Is this supposed to be kernel-doc or something like that?
No, not intentionally so. Do I can rework the formatting. Will fix in v3.
Quoted 4 lines
include/uapi/drm/drm_mode.h extern "C" { · line 132
Quoted 3 lines
include/uapi/drm/drm_mode.h +2
-0+* +* Signals that a drm plane has been rotated 0 degrees.
Quoted 8 lines
Past tense doesn't feel right to me. Maybe "is rotated"? But I'm not a native speaker so maybe it's just me.
include/uapi/drm/drm_mode.h extern "C" { · line 135
Quoted 3 lines
include/uapi/drm/drm_mode.h +3
-0+* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. Repeating this for every define seems redundant.
Ack. Will fix in v3.
Quoted 41 lines
Quoted 41 lines
include/uapi/drm/drm_mode.h +40
-0+*/ +#define DRM_MODE_PROP_ROTATE_0 (1<<0) + +/** DRM_MODE_PROP_ROTATE_90 +* +* Signals that a drm plane has been rotated 90 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_90 (1<<1) + +/** DRM_MODE_PROP_ROTATE_180 +* +* Signals that a drm plane has been rotated 180 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_180 (1<<2) + +/** DRM_MODE_PROP_ROTATE_270 +* +* Signals that a drm plane has been rotated 270 degrees in counter clockwise +* direction. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_ROTATE_270 (1<<3) + + +/** DRM_MODE_PROP_ROTATE_MASK +* +* Bitmask used to look for drm plane rotations. +*/ +#define DRM_MODE_PROP_ROTATE_MASK (DRM_MODE_PROP_ROTATE_0 | \ + DRM_MODE_PROP_ROTATE_90 | \
Quoted 8 lines
include/uapi/drm/drm_mode.h extern "C" { · line 181
Quoted 6 lines
include/uapi/drm/drm_mode.h +6
-0+DRM_MODE_PROP_ROTATE_180 | \ + DRM_MODE_PROP_ROTATE_270) + +/** DRM_MODE_PROP_REFLECT_X +* +* Signals that a drm plane has been reflected in the X axis. Seems more vague that what we had before.
I'll add some clarifications.
Quoted 31 lines
Quoted 31 lines
include/uapi/drm/drm_mode.h +24
-1+* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_REFLECT_X (1<<4) + +/** DRM_MODE_PROP_REFLECT_Y +* +* Signals that a drm plane has been reflected in the Y axis. +* +* This define is provided as a convenience, looking up the property id +* using the name->prop id lookup is the preferred method. +*/ +#define DRM_MODE_PROP_REFLECT_Y (1<<5) + + +/** DRM_MODE_PROP_REFLECT_MASK +* +* Bitmask used to look for drm plane reflections. +*/ +#define DRM_MODE_PROP_REFLECT_MASK (DRM_MODE_PROP_REFLECT_X \ + | DRM_MODE_PROP_REFLECT_Y) + +struct drm_mode_modeinfo {__u32 clock;__u16 hdisplay; --2.11.0.453.g787f75f05
Quoted 5 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
kbuild test robot
build botreproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…
Hi Robert,
[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.12-rc1 next-20170516]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Robert-Foss/drm-Add-DRM_ROTATE_-and-DRM_REFLECT_-defines-to-UAPI/20170517-003242 base: git://people.freedesktop.org/~airlied/linux.git drm-next config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
All errors (new ones prefixed by >>):
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function 'mdp5_plane_install_rotation_property':
>> drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:70:9: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0,
^~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:70:9: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:72:9: error: 'DRM_ROTATE_180' undeclared (first use in this function)
DRM_ROTATE_180 |
^~~~~~~~~~~~~~
>> drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:73:9: error: 'DRM_REFLECT_X' undeclared (first use in this function)
DRM_REFLECT_X |
^~~~~~~~~~~~~
>> drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:74:9: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
DRM_REFLECT_Y);
^~~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function 'mdp5_plane_atomic_check_with_state':
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:372:8: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0 |
^~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:373:8: error: 'DRM_REFLECT_X' undeclared (first use in this function)
DRM_REFLECT_X |
^~~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:374:8: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
DRM_REFLECT_Y);
^~~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function 'mdp5_plane_mode_set':
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:973:7: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0 |
^~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:974:7: error: 'DRM_REFLECT_X' undeclared (first use in this function)
DRM_REFLECT_X |
^~~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:975:7: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
DRM_REFLECT_Y);
^~~~~~~~~~~~~vim +/DRM_ROTATE_0 +70 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
06c0dd96 Rob Clark 2013-11-30 64 }
06c0dd96 Rob Clark 2013-11-30 65
8089082f jilai wang 2015-07-31 66 static void mdp5_plane_install_rotation_property(struct drm_device *dev,
8089082f jilai wang 2015-07-31 67 struct drm_plane *plane)
8089082f jilai wang 2015-07-31 68 {
5b560c3a Ville Syrjälä 2016-10-21 69 drm_plane_create_rotation_property(plane,
5b560c3a Ville Syrjälä 2016-10-21 @70 DRM_ROTATE_0,
5b560c3a Ville Syrjälä 2016-10-21 71 DRM_ROTATE_0 |
574a37b1 Ville Syrjälä 2016-10-21 @72 DRM_ROTATE_180 |
5b560c3a Ville Syrjälä 2016-10-21 @73 DRM_REFLECT_X |
5b560c3a Ville Syrjälä 2016-10-21 @74 DRM_REFLECT_Y);
8089082f jilai wang 2015-07-31 75 }
8089082f jilai wang 2015-07-31 76
06c0dd96 Rob Clark 2013-11-30 77 /* helper to install properties which are common to planes and crtcs */:::::: The code at line 70 was first introduced by commit
:::::: 5b560c3a99a0d1a65132ce6f2f5a8505536613e4 drm/msm/mdp5: Use per-plane rotation property
:::::: TO: Ville Syrjälä <[email protected]> :::::: CC: Daniel Vetter <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
kbuild test robot
build botreproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…
Hi Robert,
[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.12-rc1 next-20170516]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Robert-Foss/drm-Add-DRM_ROTATE_-and-DRM_REFLECT_-defines-to-UAPI/20170517-003242 base: git://people.freedesktop.org/~airlied/linux.git drm-next config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All error/warnings (new ones prefixed by >>):
drivers/gpu//drm/imx/ipuv3-plane.c: In function 'ipu_plane_state_reset':
>> drivers/gpu//drm/imx/ipuv3-plane.c:276:30: error: 'DRM_ROTATE_0' undeclared (first use in this function)
ipu_state->base.rotation = DRM_ROTATE_0;
^~~~~~~~~~~~
drivers/gpu//drm/imx/ipuv3-plane.c:276:30: note: each undeclared identifier is reported only once for each function it appears in
--
drivers/gpu//drm/omapdrm/omap_drv.c: In function 'dev_lastclose':
>> drivers/gpu//drm/omapdrm/omap_drv.c:580:12: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0);
^~~~~~~~~~~~
drivers/gpu//drm/omapdrm/omap_drv.c:580:12: note: each undeclared identifier is reported only once for each function it appears in
--
drivers/gpu//drm/omapdrm/omap_plane.c: In function 'omap_plane_atomic_disable':
>> drivers/gpu//drm/omapdrm/omap_plane.c:144:27: error: 'DRM_ROTATE_0' undeclared (first use in this function)
plane->state->rotation = DRM_ROTATE_0;
^~~~~~~~~~~~
drivers/gpu//drm/omapdrm/omap_plane.c:144:27: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu//drm/omapdrm/omap_plane.c: In function 'omap_plane_atomic_check':
drivers/gpu//drm/omapdrm/omap_plane.c:180:25: error: 'DRM_ROTATE_0' undeclared (first use in this function)
if (state->rotation != DRM_ROTATE_0 &&
^~~~~~~~~~~~
drivers/gpu//drm/omapdrm/omap_plane.c: In function 'omap_plane_install_properties':
drivers/gpu//drm/omapdrm/omap_plane.c:216:11: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0,
^~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_plane.c:217:26: error: 'DRM_ROTATE_90' undeclared (first use in this function)
DRM_ROTATE_0 | DRM_ROTATE_90 |
^~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_plane.c:218:11: error: 'DRM_ROTATE_180' undeclared (first use in this function)
DRM_ROTATE_180 | DRM_ROTATE_270 |
^~~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_plane.c:218:28: error: 'DRM_ROTATE_270' undeclared (first use in this function)
DRM_ROTATE_180 | DRM_ROTATE_270 |
^~~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_plane.c:219:11: error: 'DRM_REFLECT_X' undeclared (first use in this function)
DRM_REFLECT_X | DRM_REFLECT_Y);
^~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_plane.c:219:27: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
DRM_REFLECT_X | DRM_REFLECT_Y);
^~~~~~~~~~~~~
drivers/gpu//drm/omapdrm/omap_plane.c: In function 'omap_plane_reset':
drivers/gpu//drm/omapdrm/omap_plane.c:276:30: error: 'DRM_ROTATE_0' undeclared (first use in this function)
omap_state->base.rotation = DRM_ROTATE_0;
^~~~~~~~~~~~
--
drivers/gpu//drm/omapdrm/omap_fb.c: In function 'omap_framebuffer_update_scanout':
>> drivers/gpu//drm/omapdrm/omap_fb.c:170:27: error: 'DRM_ROTATE_MASK' undeclared (first use in this function)
switch (win->rotation & DRM_ROTATE_MASK) {
^~~~~~~~~~~~~~~
drivers/gpu//drm/omapdrm/omap_fb.c:170:27: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu//drm/omapdrm/omap_fb.c:176:8: error: 'DRM_ROTATE_0' undeclared (first use in this function)
case DRM_ROTATE_0:
^~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_fb.c:179:8: error: 'DRM_ROTATE_90' undeclared (first use in this function)
case DRM_ROTATE_90:
^~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_fb.c:182:8: error: 'DRM_ROTATE_180' undeclared (first use in this function)
case DRM_ROTATE_180:
^~~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_fb.c:185:8: error: 'DRM_ROTATE_270' undeclared (first use in this function)
case DRM_ROTATE_270:
^~~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_fb.c:190:23: error: 'DRM_REFLECT_X' undeclared (first use in this function)
if (win->rotation & DRM_REFLECT_X)
^~~~~~~~~~~~~
>> drivers/gpu//drm/omapdrm/omap_fb.c:193:23: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
if (win->rotation & DRM_REFLECT_Y)
^~~~~~~~~~~~~
--
drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_plane_reset':
>> drivers/gpu/drm/arm/malidp_planes.c:83:26: error: 'DRM_ROTATE_0' undeclared (first use in this function)
state->base.rotation = DRM_ROTATE_0;
^~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_planes.c:83:26: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_de_plane_check':
drivers/gpu/drm/arm/malidp_planes.c:224:25: error: 'DRM_ROTATE_0' undeclared (first use in this function)
if (state->rotation != DRM_ROTATE_0 &&
^~~~~~~~~~~~
In file included from drivers/gpu/drm/arm/malidp_planes.c:22:0:
>> drivers/gpu/drm/arm/malidp_drv.h:68:30: error: 'DRM_ROTATE_90' undeclared (first use in this function)
#define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
^
>> drivers/gpu/drm/arm/malidp_planes.c:230:24: note: in expansion of macro 'MALIDP_ROTATED_MASK'
if (state->rotation & MALIDP_ROTATED_MASK) {
^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_drv.h:68:46: error: 'DRM_ROTATE_270' undeclared (first use in this function)
#define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
^
>> drivers/gpu/drm/arm/malidp_planes.c:230:24: note: in expansion of macro 'MALIDP_ROTATED_MASK'
if (state->rotation & MALIDP_ROTATED_MASK) {
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_de_plane_update':
>> drivers/gpu/drm/arm/malidp_planes.c:318:31: error: 'DRM_ROTATE_MASK' undeclared (first use in this function)
if (plane->state->rotation & DRM_ROTATE_MASK)
^~~~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_planes.c:321:31: error: 'DRM_REFLECT_X' undeclared (first use in this function)
if (plane->state->rotation & DRM_REFLECT_X)
^~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_planes.c:323:31: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
if (plane->state->rotation & DRM_REFLECT_Y)
^~~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_de_planes_init':
drivers/gpu/drm/arm/malidp_planes.c:373:24: error: 'DRM_ROTATE_0' undeclared (first use in this function)
unsigned long flags = DRM_ROTATE_0 | DRM_ROTATE_90 | DRM_ROTATE_180 |
^~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_planes.c:373:39: error: 'DRM_ROTATE_90' undeclared (first use in this function)
unsigned long flags = DRM_ROTATE_0 | DRM_ROTATE_90 | DRM_ROTATE_180 |
^~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_planes.c:373:55: error: 'DRM_ROTATE_180' undeclared (first use in this function)
unsigned long flags = DRM_ROTATE_0 | DRM_ROTATE_90 | DRM_ROTATE_180 |
^~~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_planes.c:374:10: error: 'DRM_ROTATE_270' undeclared (first use in this function)
DRM_ROTATE_270 | DRM_REFLECT_X | DRM_REFLECT_Y;
^~~~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_planes.c:374:27: error: 'DRM_REFLECT_X' undeclared (first use in this function)
DRM_ROTATE_270 | DRM_REFLECT_X | DRM_REFLECT_Y;
^~~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_planes.c:374:43: error: 'DRM_REFLECT_Y' undeclared (first use in this function)
DRM_ROTATE_270 | DRM_REFLECT_X | DRM_REFLECT_Y;
^~~~~~~~~~~~~
--
In file included from drivers/gpu/drm/arm/malidp_crtc.c:22:0:
drivers/gpu/drm/arm/malidp_crtc.c: In function 'malidp_crtc_atomic_check':
>> drivers/gpu/drm/arm/malidp_drv.h:68:30: error: 'DRM_ROTATE_90' undeclared (first use in this function)
#define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
^
>> drivers/gpu/drm/arm/malidp_crtc.c:364:26: note: in expansion of macro 'MALIDP_ROTATED_MASK'
if (pstate->rotation & MALIDP_ROTATED_MASK)
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/arm/malidp_drv.h:68:30: note: each undeclared identifier is reported only once for each function it appears in
#define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
^
>> drivers/gpu/drm/arm/malidp_crtc.c:364:26: note: in expansion of macro 'MALIDP_ROTATED_MASK'
if (pstate->rotation & MALIDP_ROTATED_MASK)
^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/arm/malidp_drv.h:68:46: error: 'DRM_ROTATE_270' undeclared (first use in this function)
#define MALIDP_ROTATED_MASK (DRM_ROTATE_90 | DRM_ROTATE_270)
^
>> drivers/gpu/drm/arm/malidp_crtc.c:364:26: note: in expansion of macro 'MALIDP_ROTATED_MASK'
if (pstate->rotation & MALIDP_ROTATED_MASK)
^~~~~~~~~~~~~~~~~~~
--
drivers/gpu/drm/armada/armada_overlay.c: In function 'armada_ovl_plane_update':
>> drivers/gpu/drm/armada/armada_overlay.c:128:10: error: 'DRM_ROTATE_0' undeclared (first use in this function)
DRM_ROTATE_0,
^~~~~~~~~~~~ drivers/gpu/drm/armada/armada_overlay.c:128:10: note: each undeclared identifier is reported only once for each function it appears in
vim +/DRM_ROTATE_0 +276 drivers/gpu//drm/imx/ipuv3-plane.c
00514e85 Lucas Stach 2017-03-08 270 }
00514e85 Lucas Stach 2017-03-08 271
00514e85 Lucas Stach 2017-03-08 272 ipu_state = kzalloc(sizeof(*ipu_state), GFP_KERNEL);
00514e85 Lucas Stach 2017-03-08 273
00514e85 Lucas Stach 2017-03-08 274 if (ipu_state) {
00514e85 Lucas Stach 2017-03-08 275 ipu_state->base.plane = plane;
00514e85 Lucas Stach 2017-03-08 @276 ipu_state->base.rotation = DRM_ROTATE_0;
00514e85 Lucas Stach 2017-03-08 277 }
00514e85 Lucas Stach 2017-03-08 278
00514e85 Lucas Stach 2017-03-08 279 plane->state = &ipu_state->base;:::::: The code at line 276 was first introduced by commit
:::::: 00514e8593350498790d19c7e21b720fee899cf7 drm/imx: use PRG/PRE when possible
:::::: TO: Lucas Stach <[email protected]> :::::: CC: Philipp Zabel <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel