diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-20 07:29:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-20 07:34:16 +0100 |
commit | bfccacf745d054756661be3edd8898ac6aceb878 (patch) | |
tree | e85af3dd6fd7f57a35be13c39d2c338716af5fc4 | |
parent | 9bb2818a7db1c9dc89379996415511b6cff4bb33 (diff) |
sna/video: Bump the maximum size for sprites
A sprite plane is limited by the display engine who's maximum resolution
has increased since the 2kx2k limitations of 8xx, so let's set it
correctly to the reported maximum CRTC size (since we have no individual
query for maximum sprite plane sizes).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_video_sprite.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c index 1106c00b..80fa43f9 100644 --- a/src/sna/sna_video_sprite.c +++ b/src/sna/sna_video_sprite.c @@ -63,9 +63,6 @@ struct local_mode_set_plane { uint32_t src_h, src_w; }; -#define IMAGE_MAX_WIDTH 2048 -#define IMAGE_MAX_HEIGHT 2048 - #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, true) static Atom xvColorKey, xvAlwaysOnTop, xvSyncToVblank; @@ -584,10 +581,10 @@ static int sna_video_sprite_query(ClientPtr client, struct sna_video_frame frame; int size; - if (*w > IMAGE_MAX_WIDTH) - *w = IMAGE_MAX_WIDTH; - if (*h > IMAGE_MAX_HEIGHT) - *h = IMAGE_MAX_HEIGHT; + if (*w > video->sna->mode.max_crtc_width) + *w = video->sna->mode.max_crtc_width; + if (*h > video->sna->mode.max_crtc_height) + *h = video->sna->mode.max_crtc_height; if (offsets) offsets[0] = 0; @@ -687,8 +684,8 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen) adaptor->pEncodings[0].id = 0; adaptor->pEncodings[0].pScreen = screen; adaptor->pEncodings[0].name = (char *)"XV_IMAGE"; - adaptor->pEncodings[0].width = IMAGE_MAX_WIDTH; - adaptor->pEncodings[0].height = IMAGE_MAX_HEIGHT; + adaptor->pEncodings[0].width = sna->mode.max_crtc_width; + adaptor->pEncodings[0].height = sna->mode.max_crtc_height; adaptor->pEncodings[0].rate.numerator = 1; adaptor->pEncodings[0].rate.denominator = 1; adaptor->pFormats = formats; |