summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna_display.c5
-rw-r--r--src/sna/sna_display_fake.c4
-rw-r--r--src/sna/sna_driver.c6
3 files changed, 12 insertions, 3 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index ea0324b1..d162def4 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5677,13 +5677,13 @@ bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna)
sna_cursor_pre_init(sna);
sna_backlight_pre_init(sna);
+
+ set_size_range(sna);
} else {
if (num_fake == 0)
num_fake = 1;
}
- set_size_range(sna);
-
if (!sna_mode_fake_init(sna, num_fake))
return false;
@@ -5740,6 +5740,7 @@ sna_mode_set_primary(struct sna *sna)
if (!xf86ReturnOptValBool(output->options, OPTION_PRIMARY, FALSE))
continue;
+ DBG(("%s: setting PrimaryOutput %s\n", __FUNCTION__, output->name));
rr->primaryOutput = output->randr_output;
RROutputChanged(rr->primaryOutput, 0);
rr->layoutChanged = TRUE;
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index b143d86b..4d74c38d 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -331,8 +331,10 @@ bool sna_mode_fake_init(struct sna *sna, int num_fake)
if (num_fake == 0)
return true;
- if (sna->mode.num_real_crtc == 0)
+ if (sna->mode.num_real_crtc == 0) {
xf86CrtcConfigInit(sna->scrn, &sna_mode_funcs);
+ xf86CrtcSetSizeRange(sna->scrn, 1, 1, INT16_MAX, INT16_MAX);
+ }
ret = true;
while (ret && num_fake--)
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 4b35fe96..66f72dc2 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -445,8 +445,14 @@ static Bool fb_supports_depth(int fd, int depth)
{
struct drm_i915_gem_create create;
struct drm_mode_fb_cmd fb;
+ struct drm_mode_card_res res;
Bool ret;
+ memset(&res, 0, sizeof(res));
+ (void)drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res);
+ if (res.count_crtcs == 0)
+ return TRUE;
+
VG_CLEAR(create);
create.handle = 0;
create.size = 4096;