Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-intel-fixes-2015-09-24' of git://anongit.freedesktop.org/drm-intel into drm-fixes

a few drm/i915 fixes, including a fix to the recent regression
reported by Sedat Dilek

* tag 'drm-intel-fixes-2015-09-24' of git://anongit.freedesktop.org/drm-intel:
drm/i915/bios: handle MIPI Sequence Block v3+ gracefully
drm/i915: Add primary plane to mask if it's visible
drm/i915: workaround bad DSL readout v3
drm/i915: fix kernel-doc warnings in intel_audio.c

+43 -4
+26
drivers/gpu/drm/i915/i915_irq.c
··· 640 640 position = __raw_i915_read32(dev_priv, PIPEDSL(pipe)) & DSL_LINEMASK_GEN3; 641 641 642 642 /* 643 + * On HSW, the DSL reg (0x70000) appears to return 0 if we 644 + * read it just before the start of vblank. So try it again 645 + * so we don't accidentally end up spanning a vblank frame 646 + * increment, causing the pipe_update_end() code to squak at us. 647 + * 648 + * The nature of this problem means we can't simply check the ISR 649 + * bit and return the vblank start value; nor can we use the scanline 650 + * debug register in the transcoder as it appears to have the same 651 + * problem. We may need to extend this to include other platforms, 652 + * but so far testing only shows the problem on HSW. 653 + */ 654 + if (IS_HASWELL(dev) && !position) { 655 + int i, temp; 656 + 657 + for (i = 0; i < 100; i++) { 658 + udelay(1); 659 + temp = __raw_i915_read32(dev_priv, PIPEDSL(pipe)) & 660 + DSL_LINEMASK_GEN3; 661 + if (temp != position) { 662 + position = temp; 663 + break; 664 + } 665 + } 666 + } 667 + 668 + /* 643 669 * See update_scanline_offset() for the details on the 644 670 * scanline_offset adjustment. 645 671 */
+1 -1
drivers/gpu/drm/i915/intel_audio.c
··· 430 430 431 431 /** 432 432 * intel_audio_codec_disable - Disable the audio codec for HD audio 433 - * @encoder: encoder on which to disable audio 433 + * @intel_encoder: encoder on which to disable audio 434 434 * 435 435 * The disable sequences must be performed before disabling the transcoder or 436 436 * port.
+11 -1
drivers/gpu/drm/i915/intel_bios.c
··· 42 42 const struct bdb_header *bdb = _bdb; 43 43 const u8 *base = _bdb; 44 44 int index = 0; 45 - u16 total, current_size; 45 + u32 total, current_size; 46 46 u8 current_id; 47 47 48 48 /* skip to first section */ ··· 56 56 57 57 current_size = *((const u16 *)(base + index)); 58 58 index += 2; 59 + 60 + /* The MIPI Sequence Block v3+ has a separate size field. */ 61 + if (current_id == BDB_MIPI_SEQUENCE && *(base + index) >= 3) 62 + current_size = *((const u32 *)(base + index + 1)); 59 63 60 64 if (index + current_size > total) 61 65 return NULL; ··· 800 796 sequence = find_section(bdb, BDB_MIPI_SEQUENCE); 801 797 if (!sequence) { 802 798 DRM_DEBUG_KMS("No MIPI Sequence found, parsing complete\n"); 799 + return; 800 + } 801 + 802 + /* Fail gracefully for forward incompatible sequence block. */ 803 + if (sequence->version >= 3) { 804 + DRM_ERROR("Unable to parse MIPI Sequence Block v3+\n"); 803 805 return; 804 806 } 805 807
+5 -2
drivers/gpu/drm/i915/intel_display.c
··· 15087 15087 15088 15088 plane_state = to_intel_plane_state(p->base.state); 15089 15089 15090 - if (p->base.type == DRM_PLANE_TYPE_PRIMARY) 15090 + if (p->base.type == DRM_PLANE_TYPE_PRIMARY) { 15091 15091 plane_state->visible = primary_get_hw_state(crtc); 15092 - else { 15092 + if (plane_state->visible) 15093 + crtc->base.state->plane_mask |= 15094 + 1 << drm_plane_index(&p->base); 15095 + } else { 15093 15096 if (active) 15094 15097 p->disable_plane(&p->base, &crtc->base); 15095 15098