1. 20 1月, 2013 1 次提交
    • B
      drm/i915: Remove use of gtt_mappable_entries · 93d18799
      Ben Widawsky 提交于
      Mappable_end, ie. size is almost always what you want as opposed to the
      number of entries. Since we already have that information, we can scrap
      the number of entries and only calculate it when needed.
      
      If gtt_start is !0, this will have slightly different behavior. This
      difference can only occur in DRI1, and exists when we try to kick out
      the firmware fb. The new code seems like a bugfix to me.
      
      The other case where we've changed the behavior is during init we check
      the mappable region against our current known upper and lower limits
      (64MB, and 512MB). This now matches the comment, and makes things more
      convenient after removing gtt_mappable_entries.
      
      Also worth noting is the setting of mappable_end is taken out of setup
      because we do it earlier now in the DRI2 case and therefore need to add
      that tiny hunk to support the DRI1 IOCTL.
      
      v2: Move up mappable end to before legacy AGP init
      
      v3: Add the dev_priv inclusion here from previous rebase error in patch
      5
      
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v2)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: squash in fix for a printk format flag mismatch warning.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93d18799
  2. 18 1月, 2013 4 次提交
    • B
      drm/i915: Remove use on gma_bus_addr on gen6+ · dabb7a91
      Ben Widawsky 提交于
      We have enough info to not use the intel_gtt bridge stuff.
      
      v2: Move setup of mappable_base above the legacy init stuff because we
      still need that on older platforms. (Daniel)
      
      v3: Remove the dev_priv hunk which was rebased in by accident
      
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v2)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dabb7a91
    • B
      drm/i915: Create a gtt structure · 5d4545ae
      Ben Widawsky 提交于
      The purpose of the gtt structure is to help isolate our gtt specific
      properties from the rest of the code (in doing so it help us finish the
      isolation from the AGP connection).
      
      The following members are pulled out (and renamed):
      gtt_start
      gtt_total
      gtt_mappable_end
      gtt_mappable
      gtt_base_addr
      gsm
      
      The gtt structure will serve as a nice place to put gen specific gtt
      routines in upcoming patches. As far as what else I feel belongs in this
      structure: it is meant to encapsulate the GTT's physical properties.
      This is why I've not added fields which track various drm_mm properties,
      or things like gtt_mtrr (which is itself a pretty transient field).
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [Ben modified commit messages]
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d4545ae
    • C
      drm/i915: Use the reloc.handle as an index into the execbuffer array · eef90ccb
      Chris Wilson 提交于
      Using copywinwin10 as an example that is dependent upon emitting a lot
      of relocations (2 per operation), we see improvements of:
      
      c2d/gm45: 618000.0/sec to 623000.0/sec.
      i3-330m: 748000.0/sec to 789000.0/sec.
      
      (measured relative to a baseline with neither optimisations applied).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      eef90ccb
    • D
      drm/i915: Allow userspace to hint that the relocations were known · ed5982e6
      Daniel Vetter 提交于
      Userspace is able to hint to the kernel that its command stream and
      auxiliary state buffers already hold the correct presumed addresses and
      so the relocation process may be skipped if the kernel does not need to
      move any buffers in preparation for the execbuffer. Thus for the common
      case where the allotment of buffers is static between batches, we can
      avoid the overhead of individually checking the relocation entries.
      
      Note that this requires userspace to supply the domain tracking and
      requests for workarounds itself that would otherwise be computed based
      upon the relocation entries.
      
      Using copywinwin10 as an example that is dependent upon emitting a lot
      of relocations (2 per operation), we see improvements of:
      
      c2d/gm45: 618000.0/sec to 632000.0/sec.
      i3-330m: 748000.0/sec to 830000.0/sec.
      
      (measured relative to a baseline with neither optimisations applied).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      [danvet: Fixup merge conflict in userspace header due to different
      baseline trees.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed5982e6
  3. 18 12月, 2012 2 次提交
    • D
      drm/i915: fixup overlay stolen memory leak · 4d7bb011
      Daniel Vetter 提交于
      We need to clean up the overlay first, before taking down the
      stolen memory allocator.
      
      This regression has been introducec in
      
      commit 80405138
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Nov 15 11:32:29 2012 +0000
      
          drm/i915: Allocate overlay registers from stolen memory
      
      v2: Rework the patch a bit as suggested by Chris Wilson:
      - move the overlay teardown up, into the modeset cleanup
      - move the stolen mm takedown into i915_gem_cleanup_stolen
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4d7bb011
    • D
      drm/i915: Implement workaround for broken CS tlb on i830/845 · b45305fc
      Daniel Vetter 提交于
      Now that Chris Wilson demonstrated that the key for stability on early
      gen 2 is to simple _never_ exchange the physical backing storage of
      batch buffers I've tried a stab at a kernel solution. Doesn't look too
      nefarious imho, now that I don't try to be too clever for my own good
      any more.
      
      v2: After discussing the various techniques, we've decided to always blit
      batches on the suspect devices, but allow userspace to opt out of the
      kernel workaround assume full responsibility for providing coherent
      batches. The principal reason is that avoiding the blit does improve
      performance in a few key microbenchmarks and also in cairo-trace
      replays.
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet:
      - Drop the hunk which uses HAS_BROKEN_CS_TLB to implement the ring
        wrap w/a. Suggested by Chris Wilson.
      - Also add the ACTHD check from Chris Wilson for the error state
        dumping, so that we still catch batches when userspace opts out of
        the w/a.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b45305fc
  4. 13 12月, 2012 1 次提交
    • D
      drm/i915: rework locking for intel_dpio|sbi_read|write · 09153000
      Daniel Vetter 提交于
      Spinning for up to 200 us with interrupts locked out is not good. So
      let's just spin (and even that seems to be excessive).
      
      And we don't call these functions from interrupt context, so this is
      not required. Besides that doing anything in interrupt contexts which
      might take a few hundred us is a no-go. So just convert the entire
      thing to a mutex. Also move the mutex-grabbing out of the read/write
      functions (add a WARN_ON(!is_locked)) instead) since all callers are
      nicely grouped together.
      
      Finally the real motivation for this change: Dont grab the modeset
      mutex in the dpio debugfs file, we don't need that consistency. And
      correctness of the dpio interface is ensured with the dpio_lock.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      09153000
  5. 12 12月, 2012 1 次提交
    • D
      drm/i915: Fixup hpd irq register setup ordering · 20afbda2
      Daniel Vetter 提交于
      For GMCH platforms we set up the hpd irq registers in the irq
      postinstall hook. But since we only enable the irq sources we actually
      need in PORT_HOTPLUG_EN/STATUS, taking dev_priv->hotplug_supported_mask
      into account, no hpd interrupt sources is enabled since
      
      commit 52d7eced
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Dec 1 21:03:22 2012 +0100
      
          drm/i915: reorder setup sequence to have irqs for output setup
      
      Wrongly set-up interrupts also lead to broken hw-based load-detection
      on at least GM45, resulting in ghost VGA/TV-out outputs.
      
      To fix this, delay the hotplug register setup until after all outputs
      are set up, by moving it into a new dev_priv->display.hpd_irq_callback.
      We might also move the PCH_SPLIT platforms to such a setup eventually.
      
      Another funny part is that we need to delay the fbdev initial config
      probing until after the hpd regs are setup, for otherwise it'll detect
      ghost outputs. But we can only enable the hpd interrupt handling
      itself (and the output polling) _after_ that initial scan, due to
      massive locking brain-damage in the fbdev setup code. Add a big
      comment to explain this cute little dragon lair.
      
      v2: Encapsulate all the fbdev handling by wrapping the move call into
      intel_fbdev_initial_config in intel_fb.c. Requested by Chris Wilson.
      
      v3: Applied bikeshed from Jesse Barnes.
      
      v4: Imre Deak noticed that we also need to call intel_hpd_init after
      the drm_irqinstall calls in the gpu reset and resume paths - otherwise
      hotplug will be broken. Also improve the comment a bit about why
      hpd_init needs to be called before we set up the initial fbdev config.
      
      Bugzilla: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54943Reported-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v3)
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      20afbda2
  6. 06 12月, 2012 3 次提交
    • D
      drm/i915: irq-drive the dp aux communication · 9ee32fea
      Daniel Vetter 提交于
      At least on the platforms that have a dp aux irq and also have it
      enabled - vlvhsw should have one, too. But I don't have a machine to
      test this on. Judging from docs there's no dp aux interrupt for gm45.
      
      Also, I only have an ivb cpu edp machine, so the dp aux A code for
      snb/ilk is untested.
      
      For dpcd probing when nothing is connected it slashes about 5ms of cpu
      time (cpu time is now negligible), which agrees with 3 * 5 400 usec
      timeouts.
      
      A previous version of this patch increases the time required to go
      through the dp_detect cycle (which includes reading the edid) from
      around 33 ms to around 40 ms. Experiments indicated that this is
      purely due to the irq latency - the hw doesn't allow us to queue up
      dp aux transactions and hence irq latency directly affects throughput.
      gmbus is much better, there we have a 8 byte buffer, and we get the
      irq once another 4 bytes can be queued up.
      
      But by using the pm_qos interface to request the lowest possible cpu
      wake-up latency this slowdown completely disappeared.
      
      Since all our output detection logic is single-threaded with the
      mode_config mutex right now anyway, I've decide not ot play fancy and
      to just reuse the gmbus wait queue. But this would definitely prep the
      way to run dp detection on different ports in parallel
      
      v2: Add a timeout for dp aux transfers when using interrupts - the hw
      _does_  prevent this with the hw-based 400 usec timeout, but if the
      irq somehow doesn't arrive we're screwed. Lesson learned while
      developing this ;-)
      
      v3: While at it also convert the busy-loop to wait_for_atomic, so that
      we don't run the risk of an infinite loop any more.
      
      v4: Ensure we have the smallest possible irq latency by using the
      pm_qos interface.
      
      v5: Add a comment to the code to explain why we frob pm_qos. Suggested
      by Chris Wilson.
      
      v6: Disable dp irq for vlv, that's easier than trying to get at docs
      and hw.
      
      v7: Squash in a fix for Haswell that Paulo Zanoni tracked down - the
      dp aux registers aren't at a fixed offset any more, but can be on the
      PCH while the DP port is on the cpu die.
      
      Reviewed-by: Imre Deak <imre.deak@intel.com> (v6)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9ee32fea
    • D
      drm/i915: reorder setup sequence to have irqs for output setup · 52d7eced
      Daniel Vetter 提交于
      Otherwise the new&shiny irq-driven gmbus and dp aux code won't work that
      well. Noticed since the dp aux code doesn't have an automatic fallback
      with a timeout (since the hw provides for that already).
      
      v2: Simple move drm_irq_install before intel_modeset_gem_init, as
      suggested by Ben Widawsky.
      
      v3: Now that interrupts are enabled before all connectors are fully
      set up, we might fall over serving a HPD interrupt while things are
      still being set up. Instead of jumping through massive hoops and
      complicating the code with a separate hpd irq enable step, simply
      block out the hotplug work item from doing anything until things are
      in place.
      
      v4: Actually, we can enable hotplug processing only after the fbdev is
      fully set up, since we call down into the fbdev from the hotplug work
      functions. So stick the hpd enabling right next to the poll helper
      initialization.
      
      v5: We need to enable irqs before intel_modeset_init, since that
      function sets up the outputs.
      
      v6: Fixup cleanup sequence, too.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      52d7eced
    • D
      drm/i915: setup the hangcheck timer early · 61bac78e
      Daniel Vetter 提交于
      ... together with all the other irq related resources in
      intel_irq_init. I've managed to oops in the notify_ring function on my
      ilk, presumably because of the powerctx setup call to i915_gpu_idle.
      
      Note that this is only a problem with the reorder irq setup sequence
      for irq-driver gmbus/dp aux.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      61bac78e
  7. 04 12月, 2012 1 次提交
  8. 01 12月, 2012 1 次提交
  9. 29 11月, 2012 2 次提交
  10. 16 11月, 2012 1 次提交
  11. 12 11月, 2012 5 次提交
    • B
      drm/i915: Stop using AGP layer for GEN6+ · e76e9aeb
      Ben Widawsky 提交于
      As a quick hack we make the old intel_gtt structure mutable so we can
      fool a bunch of the existing code which depends on elements in that data
      structure. We can/should try to remove this in a subsequent patch.
      
      This should preserve the old gtt init behavior which upon writing these
      patches seems incorrect. The next patch will fix these things.
      
      The one exception is VLV which doesn't have the preserved flush control
      write behavior. Since we want to do that for all GEN6+ stuff, we'll
      handle that in a later patch. Mainstream VLV support doesn't actually
      exist yet anyway.
      
      v2: Update the comment to remove the "voodoo"
      Check that the last pte written matches what we readback
      
      v3: actually kill cache_level_to_agp_type since most of the flags will
      disappear in an upcoming patch
      
      v4: v3 was actually not what we wanted (Daniel)
      Make the ggtt bind assertions better and stricter (Chris)
      Fix some uncaught errors at gtt init (Chris)
      Some other random stuff that Chris wanted
      
      v5: check for i==0 in gen6_ggtt_bind_object to shut up gcc (Ben)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by [v4]: Chris Wilson <chris@chris-wilson.co.uk>
      [danvet: Make the cache_level -> agp_flags conversion for pre-gen6 a
      tad more robust by mapping everything != CACHE_NONE to the cached agp
      flag - we have a 1:1 uncached mapping, but different modes of
      cacheable (at least on later generations). Suggested by Chris Wilson.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e76e9aeb
    • J
      drm/i915: don't rewrite the GTT on resume v4 · 1abd02e2
      Jesse Barnes 提交于
      The BIOS shouldn't be touching this memory across suspend/resume, so
      just leave it alone.  This saves us ~6ms on resume on my T420 (retested
      with write combined PTEs).
      
      v2: change gtt restore default on pre-gen4 (Chris)
          move needs_gtt_restore flag into dev_priv
      v3: make sure we restore GTT on resume from hibernate (Daniel)
          use opregion support as the cutoff for restore from resume (Chris)
      v4: use a better check for opregion (Chris)
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Kill the needs_gtt_restore indirection and check directly for
      OpRegion. Also explain in a comment what's going on.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1abd02e2
    • J
      drm/i915: protect RPS/RC6 related accesses (including PCU) with a new mutex · 4fc688ce
      Jesse Barnes 提交于
      This allows the power related code to run independently of the rest of
      the pipeline, extending the resume and init time improvements into
      userspace, which would otherwise have been blocked on the struct mutex
      if we were doing PCU communication.
      
      v2: Also convert the locking for the rps sysfs interface.
      Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4fc688ce
    • J
      drm/i915: don't block resume on fb console resume v2 · 073f34d9
      Jesse Barnes 提交于
      The console lock can be contended, so rather than prevent other drivers
      after us from being held up, queue the console suspend into the global
      work queue that can happen anytime.  I've measured this to take around
      200ms on my T420.  Combined with the ring freq/turbo change, we should
      save almost 1/2 a second on resume.
      
      v2: use console_trylock() to try to resume the console immediately (Chris)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: move dev_priv->console_resume_work next to the fbdev
      pointer.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      073f34d9
    • D
      drm/i915: move dri1 dungeon out of dev_priv · 231f42a4
      Daniel Vetter 提交于
      Also, move dev_priv->counter there, it's only used in i915_dma.c
      
      And also move the dri1 dungeon at the end of dev_priv where no one
      cares about it.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      231f42a4
  12. 26 10月, 2012 1 次提交
  13. 18 10月, 2012 1 次提交
    • C
      drm/i915: Allow DRM_ROOT_ONLY|DRM_MASTER to submit privileged batchbuffers · d7d4eedd
      Chris Wilson 提交于
      With the introduction of per-process GTT space, the hardware designers
      thought it wise to also limit the ability to write to MMIO space to only
      a "secure" batch buffer. The ability to rewrite registers is the only
      way to program the hardware to perform certain operations like scanline
      waits (required for tear-free windowed updates). So we either have a
      choice of adding an interface to perform those synchronized updates
      inside the kernel, or we permit certain processes the ability to write
      to the "safe" registers from within its command stream. This patch
      exposes the ability to submit a SECURE batch buffer to
      DRM_ROOT_ONLY|DRM_MASTER processes.
      
      v2: Haswell split up bit8 into a ppgtt bit (still bit8) and a security
      bit (bit 13, accidentally not set). Also add a comment explaining why
      secure batches need a global gtt binding.
      
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      [danvet: added hsw fixup.]
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d7d4eedd
  14. 03 10月, 2012 2 次提交
  15. 26 9月, 2012 1 次提交
  16. 20 9月, 2012 1 次提交
  17. 09 9月, 2012 1 次提交
  18. 24 8月, 2012 1 次提交
  19. 17 8月, 2012 2 次提交
  20. 10 8月, 2012 2 次提交
  21. 08 8月, 2012 1 次提交
    • C
      drm/i915: Add I915_GEM_PARAM_HAS_SEMAPHORES · 2fedbff9
      Chris Wilson 提交于
      Userspace tries to estimate the cost of ring switching based on whether
      the GPU and GEM supports semaphores. (If we have multiple rings and no
      semaphores, userspace assumes that the cost of switching rings between
      batches is exorbitant and will endeavour to keep the next batch on the
      active ring - as a coarse approximation to tracking both destination and
      source surfaces.) Currently userspace has to guess whether semaphores
      exist based on the chipset generation and the module parameter,
      i915.semaphores. This is a crude and inaccurate guess as the defaults
      internally depend upon other chipset features being enabled or disabled,
      nor does it extend well into the future. By exporting a HAS_SEMAPHORES
      parameter, we can easily query the driver and obtain an accurate answer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2fedbff9
  22. 26 7月, 2012 2 次提交
    • C
      drm/i915: Export ability of changing cache levels to userspace · e6994aee
      Chris Wilson 提交于
      By selecting the cache level (essentially whether or not the CPU snoops
      any updates to the bo, and on more recent machines whether it resides
      inside the CPU's last-level-cache) a userspace driver is able to then
      manage all of its memory within buffer objects, if it so desires. This
      enables the userspace driver to accelerate uploads and more importantly
      downloads from the GPU and to able to mix CPU and GPU rendering/activity
      efficiently.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Added code comment about where we plan to stuff platform
      specific cacheing control bits in the ioctl struct.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e6994aee
    • B
      drm/i915: add register read IOCTL · c0c7babc
      Ben Widawsky 提交于
      The interface's immediate purpose is to do synchronous timestamp queries
      as required by GL_TIMESTAMP. The GPU has a register for reading the
      timestamp but because that would normally require root access through
      libpciaccess, the IOCTL can provide this service instead.
      
      Currently the implementation whitelists only the render ring timestamp
      register, because that is the only thing we need to expose at this time.
      
      v2: make size implicit based on the register offset
      Add a generation check
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Cc: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: fixup the ioctl numerb:]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c0c7babc
  23. 25 7月, 2012 1 次提交
    • D
      drm/i915: unbreak lastclose for failed driver init · e8aeaee7
      Daniel Vetter 提交于
      We now refuse to load on gen6+ if kms is not enabled:
      
      commit 26394d92
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Mon Mar 26 21:33:18 2012 +0200
      
          drm/i915: refuse to load on gen6+ without kms
      
      Which results in the drm core calling our lastclose function to clean
      up the mess, but that one is neatly broken for such failure cases
      since kms has been introduced in
      
      commit 79e53945
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Fri Nov 7 14:24:08 2008 -0800
      
          DRM: i915: add mode setting support
      Reported-and-tested-by: NPaulo Zanoni <przanoni@gmail.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e8aeaee7
  24. 05 7月, 2012 1 次提交
    • P
      drm/i915: get rid of dev_priv->info->has_pch_split · 45e6e3a1
      Paulo Zanoni 提交于
      Previously we had has_pch_split to tell us whether we had a PCH or not
      and we also had dev_priv->pch_type to tell us which kind of PCH it
      was, but it could only be used if we were 100% sure we did have a PCH.
      Now that PCH_NONE was added to dev_priv->pch_type we don't need
      has_pch_split anymore: we can just check for pch_type != PCH_NONE.
      
      The HAS_PCH_{IBX,CPT,LPT} macros use dev_priv->pch_type, so they can
      only be called after intel_detect_pch. The HAS_PCH_SPLIT macro looks
      at dev_priv->info->has_pch_split, which is available earlier.
      
      Since the goal is to implement HAS_PCH_SPLIT using dev_priv->pch_type
      instead of dev_priv->info->has_pch_split, we need to make sure that
      intel_detect_pch is called before any calls to HAS_PCH_SPLIT are made.
      So we moved the intel_detect_pch call to an earlier stage.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      45e6e3a1
  25. 04 7月, 2012 1 次提交