1. 14 3月, 2016 1 次提交
  2. 09 2月, 2016 1 次提交
  3. 08 1月, 2016 1 次提交
  4. 01 12月, 2015 1 次提交
    • V
      drm/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference · 4c6bcf44
      Ville Syrjälä 提交于
      Rather than using drm_match_cea_mode() to see if the EDID detailed
      timings are supposed to represent one of the CEA/HDMI modes, add a
      special version of that function that takes in an explicit clock
      tolerance value (in kHz). When looking at the detailed timings specify
      the tolerance as 5kHz due to the 10kHz clock resolution limit inherent
      in detailed timings.
      
      drm_match_cea_mode() uses the normal KHZ2PICOS() matching of clocks,
      which only allows smaller errors for lower clocks (eg. for 25200 it
      won't allow any error) and a bigger error for higher clocks (eg. for
      297000 it actually matches 296913-297000). So it doesn't really match
      what we want for the fixup. Using the explicit +-5kHz is much better
      for this use case.
      
      Not sure if we should change the normal mode matching to also use
      something else besides KHZ2PICOS() since it allows a different
      proportion of error depending on the clock. I believe VESA CVT
      allows a maximum deviation of .5%, so using that for normal mode
      matching might be a good idea?
      
      Cc: Adam Jackson <ajax@redhat.com>
      Tested-by: nathan.d.ciobanu@linux.intel.com
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92217
      Fixes: fa3a7340 ("drm/edid: Fix up clock for CEA/HDMI modes specified via detailed timings")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c6bcf44
  5. 20 10月, 2015 2 次提交
  6. 09 9月, 2015 3 次提交
  7. 11 8月, 2015 1 次提交
  8. 22 7月, 2015 1 次提交
    • D
      drm: Roll out drm_for_each_connector more · 9a9f5ce8
      Daniel Vetter 提交于
      Now that we also grab the connection_mutex and so fixed the race with
      atomic modeset we can use the iterator there too.
      
      The other special case is drm_connector_unplug_all which would have a
      locking inversion with the sysfs store/show functions if we'd grab the
      mode_config.mutex around the unplug. We could just grab
      connection_mutex instead, but that's a bit too much a dirty trick for
      my taste. Also it's only used by udl, which doesn't do any other kind
      of connector hotplugging, so should be race-free. Hence just stick
      with a comment for now.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      9a9f5ce8
  9. 13 5月, 2015 1 次提交
    • V
      drm/edid: Add CEA modes before inferred modes · 4d53dc0c
      Ville Syrjälä 提交于
      Currently we're adding CEA modes after the inferred modes, which means
      we might get multiple modes that are very close to each other, but
      slightly different, which seems a bit silly. That's because duplicate
      mode check that occurs when adding inferred modes would not consider
      CEA modes as potential duplicates. Reverse the order so that CEA
      modes get added before inferred modes, and are thus considered potential
      duplicates.
      
      Or as ajax put it on irc:
      "< ajax> the point of the "pick a timing formula" heuristic was to
      generate something the sink could _likely_ sink.  if it tells us
      timings it can sink explicitly then second-guessing seems dumb."
      
      Cc: Adam Jackson <ajax@redhat.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4d53dc0c
  10. 08 5月, 2015 2 次提交
    • D
      drm/edid: Kerneldoc for newly added edid_corrupt · ac6f2e29
      Daniel Vetter 提交于
      Also treat it as a proper boolean.
      
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      ac6f2e29
    • T
      drm: Add edid_corrupt flag for Displayport Link CTS 4.2.2.6 · 6ba2bd3d
      Todd Previte 提交于
      Displayport compliance test 4.2.2.6 requires that a source device be capable of
      detecting a corrupt EDID. The test specification states that the sink device
      sets up the EDID with an invalid checksum. To do this, the sink sets up an
      invalid EDID header, expecting the source device to generate the checksum and
      compare it to the value stored in the last byte of the block data.
      
      Unfortunately, the DRM EDID reading and parsing functions are actually too good
      in this case; the header is fixed before the checksum is computed and thus the
      test never sees the invalid checksum. This results in a failure to pass the
      compliance test.
      
      To correct this issue, when the EDID code detects that the header is invalid,
      a flag is set to indicate that the EDID is corrupted. In this case, it sets
      edid_corrupt flag and continues with its fix-up code. This flag is also set in
      the case of a more seriously damaged header (fixup score less than the
      threshold). For consistency, the edid_corrupt flag is also set when the
      checksum is invalid as well.
      
      V2:
      - Removed the static bool global
      - Added a bool to the drm_connector struct to reaplce the static one for
        holding the status of raw edid header corruption detection
      - Modified the function signature of the is_valid function to take an
        additional parameter to store the corruption detected value
      - Fixed the other callers of the above is_valid function
      V3:
      - Updated the commit message to be more clear about what and why this
        patch does what it does.
      - Added comment in code to clarify the operations there
      - Removed compliance variable and check_link_status update; those
        have been moved to a later patch
      - Removed variable assignment from the bottom of the test handler
      V4:
      - Removed i915 tag from subject line as the patch is not i915-specific
      V5:
      - Moved code causing a compilation error to this patch where the variable
        is actually declared
      - Maintained blank lines / spacing so as to not contaminate the patch
      V6:
      - Removed extra debug messages
      - Added documentation to for the added parameter on drm_edid_block_valid
      - Fixed more whitespace issues in check_link_status
      - Added a clear of the header_corrupt flag to the end of the test handler
        in intel_dp.c
      - Changed the usage of the new function prototype in several places to use
        NULL where it is not needed by compliance testing
      V7:
      - Updated to account for long_pulse flag propagation
      V8:
      - Removed clearing of header_corrupt flag from the test handler in intel_dp.c
      - Added clearing of header_corrupt flag in the drm_edid_block_valid function
      V9:
      - Renamed header_corrupt flag to edid_corrupt to more accurately reflect its
        value and purpose
      - Updated commit message
      V10:
      - Updated for versioning and patch swizzle
      - Revised the title to more accurately reflect the nature and contents of
        the patch
      - Fixed formatting/whitespace problems
      - Added set flag when computed checksum is invalid
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Cc: dri-devel@lists.freedesktop.org
      Acked-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ba2bd3d
  11. 07 5月, 2015 3 次提交
  12. 09 12月, 2014 1 次提交
  13. 04 12月, 2014 1 次提交
  14. 02 12月, 2014 2 次提交
  15. 01 12月, 2014 1 次提交
  16. 27 11月, 2014 1 次提交
  17. 14 11月, 2014 1 次提交
  18. 01 10月, 2014 1 次提交
  19. 15 9月, 2014 1 次提交
  20. 12 9月, 2014 1 次提交
    • J
      drm: use c99 initializers in structures · d456ea2e
      Julia Lawall 提交于
      Use c99 initializers for structures.
      
      Drop 0 initializers in drivers/gpu/drm/sti/sti_vtac.c.  A 0x0 initializer
      is left in vtac_mode_aux in drivers/gpu/drm/sti/sti_vtac.c to highlight the
      relation to vtac_mode_main.
      
      A simplified version of the semantic match that finds the first problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @decl@
      identifier i1,fld;
      type T;
      field list[n] fs;
      @@
      
      struct i1 {
       fs
       T fld;
       ...};
      
      @bad@
      identifier decl.i1,i2;
      expression e;
      initializer list[decl.n] is;
      @@
      
      struct i1 i2 = { is,
      + .fld = e
      - e
       ,...};
      // </smpl>
      
      v2: Drop 0 initializers and add trailing commas at the suggestions of Josh
      Triplett.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d456ea2e
  21. 15 8月, 2014 1 次提交
    • D
      drm: Docbook fixes · 295ee853
      Daniel Vetter 提交于
      Bunch of small leftovers spotted by looking at the make htmldocs output.
      
      I've left out dp mst, there's too much amiss there.
      
      v2: Also add the missing parameter docbook in the dp mst code - Dave
      Airlie correctly pointed out that we don't actually want kerneldoc for
      the missing structure members in header files.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      295ee853
  22. 23 7月, 2014 1 次提交
  23. 18 7月, 2014 1 次提交
  24. 10 6月, 2014 1 次提交
  25. 04 6月, 2014 2 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
    • J
      drm: replace drm_get_connector_name() with direct name field use · 25933820
      Jani Nikula 提交于
      Generated using semantic patch:
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(E)
      + E->name
      
      [airlied: regenerated]
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      25933820
  26. 03 6月, 2014 2 次提交
  27. 27 5月, 2014 1 次提交
  28. 29 4月, 2014 2 次提交
  29. 22 4月, 2014 1 次提交
    • V
      drm/edid: Fill PAR in AVI infoframe based on CEA mode list · 0967e6a5
      Vandana Kannan 提交于
      Populate PAR in infoframe structure. If there is a user setting for PAR, then
      that value is set. Else, value is taken from CEA mode list if VIC is found.
      Else, PAR is calculated from resolution. If none of these conditions are
      satisfied, PAR is NONE as per initialization.
      
      v2: Removed the part which sets PAR according to user input, based on
      Daniel's review comments.
      
      A separate patch will be submitted to create a property that would enable a
      user space app to set aspect ratio for AVI infoframe.
      
      v2: Removed the part which sets PAR according to user input, based on
      Daniel's review comments.
      
      v3: Removed calculation of PAR for non-CEA modes as per discussion with
      Ville.
      
      A separate patch will be submitted to create a property that would enable a
      user space app to set aspect ratio for AVI infoframe.
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Jesse Barnes <jesse.barnes@intel.com>
      Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Squash in fixup for htmldocs.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0967e6a5
  30. 17 3月, 2014 1 次提交