summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-25 16:49:58 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-25 16:49:58 +0000
commitded23af3cdf68ab94446b8774d6bc4d52b21907a (patch)
treefed1f4b0cdf07de8ea5ef96491a5879a2c4cb90b /src/sna/sna_display.c
parent5fa1b0a2c5e5d3e7f25bca5b79925a956253a24f (diff)
sna: Include reflections when logging mode changes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r--src/sna/sna_display.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 3cf669d1..165b9e91 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1474,15 +1474,27 @@ static char *outputs_for_crtc(xf86CrtcPtr crtc, char *outputs, int max)
static const char *rotation_to_str(Rotation rotation)
{
- switch (rotation) {
+ switch (rotation & RR_Rotate_All) {
+ case 0:
case RR_Rotate_0: return "normal";
- case RR_Rotate_90: return "right";
+ case RR_Rotate_90: return "left";
case RR_Rotate_180: return "inverted";
- case RR_Rotate_270: return "left";
+ case RR_Rotate_270: return "right";
default: return "unknown";
}
}
+static const char *reflection_to_str(Rotation rotation)
+{
+ switch (rotation & RR_Reflect_All) {
+ case 0: return "none";
+ case RR_Reflect_X: return "X axis";
+ case RR_Reflect_Y: return "Y axis";
+ case RR_Reflect_X | RR_Reflect_Y: return "X and Y axis";
+ default: return "invalid";
+ }
+}
+
static Bool
sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
Rotation rotation, int x, int y)
@@ -1499,10 +1511,10 @@ sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
return FALSE;
xf86DrvMsg(crtc->scrn->scrnIndex, X_INFO,
- "switch to mode %dx%d@%.1f on %s using pipe %d, position (%d, %d), rotation %s\n",
+ "switch to mode %dx%d@%.1f on %s using pipe %d, position (%d, %d), rotation %s, reflection %s\n",
mode->HDisplay, mode->VDisplay, xf86ModeVRefresh(mode),
outputs_for_crtc(crtc, outputs, sizeof(outputs)), sna_crtc->pipe,
- x, y, rotation_to_str(rotation));
+ x, y, rotation_to_str(rotation), reflection_to_str(rotation));
assert(mode->HDisplay <= sna->mode.kmode->max_width &&
mode->VDisplay <= sna->mode.kmode->max_height);