debian/changelog | 7 + debian/patches/series | 1 debian/patches/sna-fixup-possible-clones.diff | 130 ++++++++++++++++++++++++++ 3 files changed, 138 insertions(+)
New commits: commit fe699c4bc47146fb94e147df21edd988b4b252e9 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Fri Oct 4 11:51:27 2013 +0300 release to raring diff --git a/debian/changelog b/debian/changelog index e0f0d35..d4da552 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xserver-xorg-video-intel (2:2.21.6-0ubuntu4.3) UNRELEASED; urgency=low +xserver-xorg-video-intel (2:2.21.6-0ubuntu4.3) raring-proposed; urgency=low * sna-fixup-possible-clones.diff: Backport from 2.21.9 to fix clone mode on haswell laptops. (LP: #1202524) commit 35eb0d3209bb554ecd65be0d9a7faa08ac1bb342 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Fri Oct 4 11:41:17 2013 +0300 sna-fixup-possible-clones.diff: Backport from 2.21.9 to fix clone mode on haswell laptops. (LP: #1202524) diff --git a/debian/changelog b/debian/changelog index ef6fb6a..e0f0d35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-intel (2:2.21.6-0ubuntu4.3) UNRELEASED; urgency=low + + * sna-fixup-possible-clones.diff: Backport from 2.21.9 to fix + clone mode on haswell laptops. (LP: #1202524) + + -- Timo Aaltonen <tjaal...@ubuntu.com> Fri, 04 Oct 2013 11:39:07 +0300 + xserver-xorg-video-intel (2:2.21.6-0ubuntu4.2) raring-proposed; urgency=low * Add hsw-green-xv.patch, backport from 2.21.10 to fix green screens when using XV diff --git a/debian/patches/series b/debian/patches/series index e61d6cc..504e83f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ add-more-reserved-hsw-ids.diff add-known-hsw-names.diff add-more-correct-hsw-names.diff hsw-green-xv.patch +sna-fixup-possible-clones.diff diff --git a/debian/patches/sna-fixup-possible-clones.diff b/debian/patches/sna-fixup-possible-clones.diff new file mode 100644 index 0000000..8af11c9 --- /dev/null +++ b/debian/patches/sna-fixup-possible-clones.diff @@ -0,0 +1,130 @@ +commit fc1e0702b25e647cb423851fb7228989fec28bd6 +Author: Daniel Vetter <daniel.vet...@ffwll.ch> +Date: Wed May 29 11:25:28 2013 +0100 + + sna: fixup up possible_clones kms->X impedance mismatch + + We need to be a notch more careful with remapping the possible clones + mask from the kernel: + - SDVO and Haswell DDI have multiple connectors mapping to the same encoder. + - The connector list can be reordered compared to the encoder list. + This is used to move eDP/LVDS to the front. + + Also add even more debug output. + + Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch> + +--- a/src/sna/sna_display.c ++++ b/src/sna/sna_display.c +@@ -84,6 +84,7 @@ struct sna_property { + struct sna_output { + int id; + drmModeConnectorPtr mode_output; ++ int encoder_idx; + int num_props; + struct sna_property *props; + +@@ -98,6 +99,16 @@ struct sna_output { + struct list link; + }; + ++static inline struct sna_output *to_sna_output(xf86OutputPtr output) ++{ ++ return output->driver_private; ++} ++ ++static inline int to_connector_id(xf86OutputPtr output) ++{ ++ return to_sna_output(output)->mode_output->connector_id; ++} ++ + static inline struct sna_crtc *to_sna_crtc(xf86CrtcPtr crtc) + { + return crtc->driver_private; +@@ -735,14 +746,11 @@ sna_crtc_apply(xf86CrtcPtr crtc) + + for (i = 0; i < xf86_config->num_output; i++) { + xf86OutputPtr output = xf86_config->output[i]; +- struct sna_output *sna_output; + + if (output->crtc != crtc) + continue; + +- sna_output = output->driver_private; +- output_ids[output_count] = +- sna_output->mode_output->connector_id; ++ output_ids[output_count] = to_connector_id(output); + output_count++; + } + +@@ -2326,6 +2334,7 @@ sna_output_init(ScrnInfoPtr scrn, struct + struct sna_output *sna_output; + const char *output_name; + char name[32]; ++ int i; + + koutput = drmModeGetConnector(sna->kgem.fd, + mode->kmode->connectors[num]); +@@ -2380,6 +2389,13 @@ sna_output_init(ScrnInfoPtr scrn, struct + output->subpixel_order = subpixel_conv_table[koutput->subpixel]; + output->driver_private = sna_output; + ++ for (i = 0; i < mode->kmode->count_encoders; i++) { ++ if (enc.encoder_id == mode->kmode->encoders[i]) { ++ sna_output->encoder_idx = i; ++ break; ++ } ++ } ++ + if (is_panel(koutput->connector_type)) + sna_output_backlight_init(output); + +@@ -2395,33 +2411,34 @@ cleanup_connector: + drmModeFreeConnector(koutput); + } + +-/* The kernel reports possible encoder clones, whereas X uses a list of +- * possible connector clones. This is works when we have a 1:1 mapping +- * between encoders and connectors, but breaks for Haswell which has a pair +- * of DP/HDMI connectors hanging off a single encoder. ++/* We need to map from kms encoder based possible_clones mask to X output based ++ * possible clones masking. Note that for SDVO and on Haswell with DP/HDMI we ++ * can have more than one output hanging off the same encoder. + */ + static void + sna_mode_compute_possible_clones(ScrnInfoPtr scrn) + { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); +- unsigned clones[32] = { 0 }; + int i, j; + + assert(config->num_output <= 32); + + /* Convert from encoder numbering to output numbering */ + for (i = 0; i < config->num_output; i++) { +- unsigned mask = config->output[i]->possible_clones; +- for (j = 0; mask != 0; j++, mask >>= 1) { +- if ((mask & 1) == 0) +- continue; +- +- clones[j] |= 1 << i; ++ xf86OutputPtr output = config->output[i]; ++ unsigned mask = output->possible_clones; ++ unsigned clones = 0; ++ ++ for (j = 0; j < config->num_output; j++) { ++ if (mask & (1 << to_sna_output(config->output[j])->encoder_idx)) ++ clones |= 1 << j; + } +- } + +- for (i = 0; i < config->num_output; i++) +- config->output[i]->possible_clones = clones[i]; ++ output->possible_clones = clones; ++ DBG(("%s: updated output '%s' %d [%d] (possible crtc:%x, possible clones:%x)\n", ++ __FUNCTION__, output->name, i, to_connector_id(output), ++ output->possible_crtcs, output->possible_clones)); ++ } + } + + struct sna_visit_set_pixmap_window { -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1vs1e5-0003ax...@vasks.debian.org