diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-12 11:59:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-12 12:04:26 +0100 |
commit | b6525702b9ffd21beb8ea6bb10a8ad5ce7f9de14 (patch) | |
tree | 5152ec335e314c881e72562274c8c78ed817ad0b | |
parent | 7b281d1300127d65392aaadbbe2299fa9e1749a9 (diff) |
sna: Hook up AdjustFrame()
Looks to be unused by the core, just a solitary invocation in an obscure
extension it seems. However the implementation looks trivial so
incorporate it until it is finally removed, just in case.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna.h | 1 | ||||
-rw-r--r-- | src/sna/sna_display.c | 10 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index 16bdf134..9453c200 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -301,6 +301,7 @@ struct sna { }; Bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna); +void sna_mode_adjust_frame(struct sna *sna, int x, int y); extern void sna_mode_remove_fb(struct sna *sna); extern void sna_mode_update(struct sna *sna); extern void sna_mode_fini(struct sna *sna); diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 7926f8f3..37709eef 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -765,6 +765,16 @@ sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, return TRUE; } +void sna_mode_adjust_frame(struct sna *sna, int x, int y) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(sna->scrn); + xf86OutputPtr output = config->output[config->compat_output]; + xf86CrtcPtr crtc = output->crtc; + + if (crtc && crtc->enabled) + sna_crtc_set_mode_major(crtc, &crtc->mode, crtc->rotation, x, y); +} + static void sna_crtc_hide_cursor(xf86CrtcPtr crtc) { diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 64132b54..e5852051 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -943,6 +943,9 @@ sna_screen_init(SCREEN_INIT_ARGS_DECL) static void sna_adjust_frame(ADJUST_FRAME_ARGS_DECL) { + SCRN_INFO_PTR(arg); + DBG(("%s(%d, %d)\n", __FUNCTION__, x, y)); + sna_mode_adjust_frame(to_sna(scrn), x, y); } static void sna_free_screen(FREE_SCREEN_ARGS_DECL) |