1. 26 7月, 2012 14 次提交
    • C
      drm/i915: Remove assertion over write domain after i915_gem_object_sync() · e5f1d962
      Chris Wilson 提交于
      As we move to lazily clearing the GPU write domain only when the buffer
      becomes inactive, this leaves a window of opportunity for
      i915_gem_object_pin_to_display_plane() to detect a seemingly
      inconsistent value. This function is special as it tries to pipeline the
      operation to avoid the stall and so may not retires the buffer and we
      may not get the opportunity to clear the write domain. However, we know
      all is good, so drop the assertion.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e5f1d962
    • C
      drm/i915: Allow late allocation of request for i915_add_request() · 3bb73aba
      Chris Wilson 提交于
      Request preallocation was added to i915_add_request() in order to
      support the overlay. However, not all users care and can quite happily
      ignore the failure to allocate the request as they will simply repeat
      the request in the future.
      
      By pushing the allocation down into i915_add_request(), we can then
      remove some rather ugly error handling in the callers.
      
      v2: Nullify request->file_priv otherwise we chase a garbage pointer
      when retiring requests.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3bb73aba
    • D
      drm/i915: add inte_crt->adpa_reg · 540a8950
      Daniel Vetter 提交于
      With the base addresses shifting around, this is easier to handle.
      Also move to the real reg offset on vlv.
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      540a8950
    • D
      drm/i915: create VLV_DSIPLAY_BASE #define · a7e806de
      Daniel Vetter 提交于
      Will be used more in the next patch.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a7e806de
    • C
      drm/i915: Return a mask of the active rings in the high word of busy_ioctl · e9808edd
      Chris Wilson 提交于
      The intention is to help select which engine to use for copies with
      interoperating clients - such as a GL client making a request to the X
      server to perform a SwapBuffers, which may require copying from the
      active GL back buffer to the X front buffer.
      
      We choose to report a mask of the active rings to future proof the
      interface against any changes which may allow for the object to reside
      upon multiple rings.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: bikeshed away the write ring mask and add the explanation
      Chris sent in a follow-up mail why we decided to use masks.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e9808edd
    • 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
    • T
      drm/i915: Support for ns2501-DVO · 7434a255
      Thomas Richter 提交于
      This patch adds support for the ns2501 DVO, found in some older Fujitsu/Siemens Labtops.
      It is in the state of "works for me".
      Includes now proper DPMS support. Includes switching between resolutions -
      from 640x480 to 1024x768.
      Currently assumes that the native display resolution is 1024x768.
      
      The ns2501 seems to be rather critical - if the output PLL is not
      running, the chip doesn't seem to be clocked and then doesn't react
      on i2c messages. Thus, a quick'n-dirty trick ensures that the DVO
      is active before submitting any i2c messages to it. This is
      probably to be reviewed.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17902Signed-off-by: NThomas Richter <thor@math.tu-berlin.de>
      [danvet: fixup whitespace fail.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7434a255
    • P
      drm/i915: add port field to struct intel_dp and use it · ab9d7c30
      Paulo Zanoni 提交于
      This will be needed for Haswell, but already has its uses here.
      
      This patch started as a small patch written patch by Shobhit Kumar,
      but it has changed so much that none of its original lines remain.
      
      Credits-to: Shobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab9d7c30
    • P
      drm/i915: move common code to intel_dp_set_link_train · 47ea7542
      Paulo Zanoni 提交于
      We have some common code that we always run before calling
      intel_dp_set_link_train. This common code sets the correct training
      patterns to the DP variable. If we add more calls to
      intel_dp_set_link_train, we'll also have to duplicate this common
      code. So instead of repeating this code whenever we call
      intel_dp_set_link_train, we move the code to inside the function: now
      we check which training pattern we're going to set and then we set the
      DP register according to it.
      
      One of the side-effects of this change is that now we never forget to
      mask the training pattern bits before changing them. It looks like
      this was working before because we were first masking the bits, then
      writing 00, 01 and then 11.
      
      This patch also enables us to use the intel_dp_set_link_train function
      when disabling link training: in this case we need to avoid writing
      the DP_TRAINING_LANE*_SET AUX commands.
      
      As a bonus, the big intel_dp_{start,complete}_link_train functions
      will get smaller and a little bit easier to read.
      
      Version 2 changes:
       - Rewrite commit message.
       - Also clear the training pattern bits before changing them.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      47ea7542
    • D
      drm/i915: add port parameter to intel_hdmi_init · 08d644ad
      Daniel Vetter 提交于
      Instead of having a giant if cascade to figure this out according to
      the passed-in register. We could do quite a bit more cleaning up and
      all by using the port at more places, but I think this should be part
      of a bigger rework to introduce a struct intel_digital_port which
      would keep track of all these things. I guess this will be part of
      some haswell-DP-induced refactoring.
      
      For now this rips out the big cascade, which is what annoyed me so
      much.
      
      v2: Add port variable name back for the func decl (I've tried to trick
      myself below the 80 char limit).
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      08d644ad
    • D
      drm/i915: simplify possible_clones computation · 66a9278e
      Daniel Vetter 提交于
      Intel hw only has one MUX for encoders, so outputs are either not
      cloneable or all in the same group of cloneable outputs. This neatly
      simplifies the code and allows us to ditch some ugly if cascades in
      the dp and hdmi init code (well, we need these if cascades for other
      stuff still, but that can be taken care of in follow-up patches).
      
      Note that this changes two things:
      - dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
        gen3+, so no problem. Note that the old code had a bug and didn't
        allow cloning crt with dvo (but only the other way round).
      - sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
        work, but the only reason I've found is that you can't use the
        panel-fitter (used for lvds upscaling) with anything else. But we
        don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
        a) rather confusing b) mostly as a guideline to implementors (i.e.
        explicitly stating what is already implicit from the spec, without
        always going into the details of why). So I think we can ignore this
        - worst case we'll get a bug report from a user with with sdvo-lvds
        and sdvo-tmds and have to add that special case back in.
      
      Because sdvo lvds is a bit special explain in comments why sdvo LVDS
      outputs can be cloned, but native LVDS and eDP can't be cloned - we
      use the panel fitter for the later, but not for sdvo.
      
      Note that this also uncoditionally initializes the panel_vdd work used
      by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
      and this way we can kill the is_edp check.
      
      v2: Incorporate review from Paulo
      - Add in a missing space.
      - Pimp comment message to address his concerns.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66a9278e
    • D
      drm/i915: group ADPA #defines together · ebc0fd88
      Daniel Vetter 提交于
      Splitting them up between pch and gmch variants just makes it harder
      to find things. Especially since the hotplug bits are actually valid
      on earlier chips, too.
      
      v2: Fixed the comment as pointed out by Paulo Zanoni.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ebc0fd88
    • C
      drm/i915: Cleanup context switching through do_switch() · 9a3b5304
      Chris Wilson 提交于
      When bug hunting, I found the interface to do_switch() overly
      complicated and I believe festered the earlier bug. This aims to make
      the code a little clearer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9a3b5304
    • S
      drm/i915: Move DP structs to shared location · 54d63ca6
      Shobhit Kumar 提交于
      Move the DP structure to shared location so that it can be used from
      within the ddi module.
      
      Changes from Paulo:
      - Move less code to intel_drv.h
      - Remove #include statement
      - Replace a tab with a space in train_set
      Signed-off-by: NShobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54d63ca6
  2. 25 7月, 2012 8 次提交
  3. 20 7月, 2012 18 次提交