1. 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
  2. 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
  3. 01 12月, 2012 1 次提交
  4. 29 11月, 2012 2 次提交
  5. 16 11月, 2012 1 次提交
  6. 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
  7. 26 10月, 2012 1 次提交
  8. 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
  9. 03 10月, 2012 2 次提交
  10. 26 9月, 2012 1 次提交
  11. 20 9月, 2012 1 次提交
  12. 09 9月, 2012 1 次提交
  13. 24 8月, 2012 1 次提交
  14. 17 8月, 2012 2 次提交
  15. 10 8月, 2012 2 次提交
  16. 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
  17. 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
  18. 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
  19. 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
  20. 04 7月, 2012 1 次提交
  21. 03 7月, 2012 1 次提交
    • D
      drm/i915: kick any firmware framebuffers before claiming the gtt · 9f846a16
      Daniel Vetter 提交于
      Especially vesafb likes to map everything as uc- (yikes), and if that
      mapping hangs around still while we try to map the gtt as wc the
      kernel will downgrade our request to uc-, resulting in abyssal
      performance.
      
      Unfortunately we can't do this as early as readon does (i.e. as the
      first thing we do when initializing the hw) because our fb/mmio space
      region moves around on a per-gen basis. So I've had to move it below
      the gtt initialization, but that seems to work, too. The important
      thing is that we do this before we set up the gtt wc mapping.
      
      Now an altogether different question is why people compile their
      kernels with vesafb enabled, but I guess making things just work isn't
      bad per se ...
      
      v2:
      - s/radeondrmfb/inteldrmfb/
      - fix up error handling
      
      v3: Kill #ifdef X86, this is Intel after all. Noticed by Ben Widawsky.
      
      v4: Jani Nikula complained about the pointless bool primary
      initialization.
      
      v5: Don't oops if we can't allocate, noticed by Chris Wilson.
      
      v6: Resolve conflicts with agp rework and fixup whitespace.
      
      This is commit e188719a in drm-next.
      
      Backport to 3.5 -fixes queue requested by Dave Airlie - due to grub
      using vesa on fedora their initrd seems to load vesafb before loading
      the real kms driver. So tons more people actually experience a
      dead-slow gpu. Hence also the Cc: stable.
      
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: N"Kilarski, Bernard R" <bernard.r.kilarski@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9f846a16
  22. 26 6月, 2012 1 次提交
  23. 20 6月, 2012 2 次提交
  24. 14 6月, 2012 2 次提交
    • B
      drm/i915/context: create & destroy ioctls · 84624813
      Ben Widawsky 提交于
      Add the interfaces to allow user space to create and destroy contexts.
      Contexts are destroyed automatically if the file descriptor for the dri
      device is closed.
      
      Following convention as usual here causes checkpatch warnings.
      
      v2: with is_initialized, no longer need to init at create
      drop the context switch on create (daniel)
      
      v3: Use interruptible lock (Chris)
      return -ENODEV in !GEM case (Chris)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      84624813
    • B
      drm/i915: preliminary context support · 254f965c
      Ben Widawsky 提交于
      Very basic code for context setup/destruction in the driver.
      
      Adds the file i915_gem_context.c This file implements HW context
      support. On gen5+ a HW context consists of an opaque GPU object which is
      referenced at times of context saves and restores.  With RC6 enabled,
      the context is also referenced as the GPU enters and exists from RC6
      (GPU has it's own internal power context, except on gen5).  Though
      something like a context does exist for the media ring, the code only
      supports contexts for the render ring.
      
      In software, there is a distinction between contexts created by the
      user, and the default HW context. The default HW context is used by GPU
      clients that do not request setup of their own hardware context. The
      default context's state is never restored to help prevent programming
      errors. This would happen if a client ran and piggy-backed off another
      clients GPU state.  The default context only exists to give the GPU some
      offset to load as the current to invoke a save of the context we
      actually care about. In fact, the code could likely be constructed,
      albeit in a more complicated fashion, to never use the default context,
      though that limits the driver's ability to swap out, and/or destroy
      other contexts.
      
      All other contexts are created as a request by the GPU client. These
      contexts store GPU state, and thus allow GPU clients to not re-emit
      state (and potentially query certain state) at any time. The kernel
      driver makes certain that the appropriate commands are inserted.
      
      There are 4 entry points into the contexts, init, fini, open, close.
      The names are self-explanatory except that init can be called during
      reset, and also during pm thaw/resume. As we expect our context to be
      preserved across these events, we do not reinitialize in this case.
      
      As Adam Jackson pointed out, The cutoff of 1MB where a HW context is
      considered too big is arbitrary. The reason for this is even though
      context sizes are increasing with every generation, they have yet to
      eclipse even 32k. If we somehow read back way more than that, it
      probably means BIOS has done something strange, or we're running on a
      platform that wasn't designed for this.
      
      v2: rename load/unload to init/fini (daniel)
      remove ILK support for get_size() (indirectly daniel)
      add HAS_HW_CONTEXTS macro to clarify supported platforms (daniel)
      added comments (Ben)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      254f965c
  25. 13 6月, 2012 3 次提交
    • D
      drm/i915: kick any firmware framebuffers before claiming the gtt · e188719a
      Daniel Vetter 提交于
      Especially vesafb likes to map everything as uc- (yikes), and if that
      mapping hangs around still while we try to map the gtt as wc the
      kernel will downgrade our request to uc-, resulting in abyssal
      performance.
      
      Unfortunately we can't do this as early as readon does (i.e. as the
      first thing we do when initializing the hw) because our fb/mmio space
      region moves around on a per-gen basis. So I've had to move it below
      the gtt initialization, but that seems to work, too. The important
      thing is that we do this before we set up the gtt wc mapping.
      
      Now an altogether different question is why people compile their
      kernels with vesafb enabled, but I guess making things just work isn't
      bad per se ...
      
      v2:
      - s/radeondrmfb/inteldrmfb/
      - fix up error handling
      
      v3: Kill #ifdef X86, this is Intel after all. Noticed by Ben Widawsky.
      
      v4: Jani Nikula complained about the pointless bool primary
      initialization.
      
      v5: Don't oops if we can't allocate, noticed by Chris Wilson.
      
      v6: Resolve conflicts with agp rework and fixup whitespace.
      Reported-and-tested-by: N"Kilarski, Bernard R" <bernard.r.kilarski@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e188719a
    • D
      drm/i915 + agp/intel-gtt: prep work for direct setup · 14be93dd
      Daniel Vetter 提交于
      To be able to directly set up the intel-gtt code from drm/i915 and
      avoid setting up the fake-agp driver we need to prepare a few things:
      - pass both the bridge and gpu pci_dev to the probe function and add
        code to handle the gpu pdev both being present (for drm/i915) and
        not present (fake agp).
      - add refcounting to the remove function so that unloading drm/i915
        doesn't kill the fake agp driver
      
      v2: Fix up the cleanup and refcount, noticed by Jani Nikula.
      Reviewed-by: NJani Nikula <jani.nikula@linux.intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      14be93dd
    • D
      drm/i915: stop using dev->agp->base · dd2757f8
      Daniel Vetter 提交于
      For that to work we need to export the base address of the gtt
      mmio window from intel-gtt. Also replace all other uses of
      dev->agp by values we already have at hand.
      Reviewed-by: NJani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dd2757f8