1. 16 3月, 2020 1 次提交
    • K
      drm/edid: Distribute switch variables for initialization · deec222e
      Kees Cook 提交于
      Variables declared in a switch statement before any case statements
      cannot be automatically initialized with compiler instrumentation (as
      they are not part of any execution flow). With GCC's proposed automatic
      stack variable initialization feature, this triggers a warning (and they
      don't get initialized). Clang's automatic stack variable initialization
      (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also
      doesn't initialize such variables[1]. Note that these warnings (or silent
      skipping) happen before the dead-store elimination optimization phase,
      so even when the automatic initializations are later elided in favor of
      direct initializations, the warnings remain.
      
      To avoid these problems, lift such variables up into the next code
      block.
      
      drivers/gpu/drm/drm_edid.c: In function ‘drm_edid_to_eld’:
      drivers/gpu/drm/drm_edid.c:4395:9: warning: statement will never be
      executed [-Wswitch-unreachable]
       4395 |     int sad_count;
            |         ^~~~~~~~~
      
      [1] https://bugs.llvm.org/show_bug.cgi?id=44916
      
      v2: move into function block instead being switch-local (Ville Syrjälä)
      Signed-off-by: NKees Cook <keescook@chromium.org>
      [danvet: keep the changelog]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/202003060930.DDCCB6659@keescook
      deec222e
  2. 12 3月, 2020 1 次提交
    • M
      drm/edid: Add function to parse EDID descriptors for monitor range · a1d11d1e
      Manasi Navare 提交于
      Adaptive Sync is a VESA feature so add a DRM core helper to parse
      the EDID's detailed descritors to obtain the adaptive sync monitor range.
      Store this info as part fo drm_display_info so it can be used
      across all drivers.
      This part of the code is stripped out of amdgpu's function
      amdgpu_dm_update_freesync_caps() to make it generic and be used
      across all DRM drivers
      
      v6:
      * Call it monitor_range (Ville)
      v5:
      * Use the renamed flags
      v4:
      * Use is_display_descriptor() (Ville)
      * Name the monitor range flags (Ville)
      v3:
      * Remove the edid parsing restriction for just DP (Nicholas)
      * Use drm_for_each_detailed_block (Ville)
      * Make the drm_get_adaptive_sync_range function static (Harry, Jani)
      v2:
      * Change vmin and vmax to use u8 (Ville)
      * Dont store pixel clock since that is just a max dotclock
      and not related to VRR mode (Manasi)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
      Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200310231651.13841-2-manasi.d.navare@intel.com
      a1d11d1e
  3. 26 2月, 2020 2 次提交
  4. 15 2月, 2020 6 次提交
  5. 14 2月, 2020 1 次提交
  6. 07 2月, 2020 1 次提交
    • M
      drm/edid: fix building error · e1cf35b9
      Mauro Rossi 提交于
      Fixes the following building error:
      
      CC [M]  drivers/gpu/drm/drm_edid.o
      ~/pie-x86_kernel/kernel/drivers/gpu/drm/drm_edid.c: In function 'cea_mode_alternate_timings':
      ~/pie-x86_kernel/kernel/drivers/gpu/drm/drm_edid.c:3275:2: error: call to '__compiletime_assert_3282'
      declared with attribute error: BUILD_BUG_ON failed: cea_mode_for_vic(8)->vtotal != 262 || cea_mode_for_vic(9)->vtotal != 262 || cea_mode_for_vic(12)->vtotal != 262 || cea_mode_for_vic(13)->vtotal != 262 || cea_mode_for_vic(23)->vtotal != 312 || cea_mode_for_vic(24)->vtotal != 312 || cea_mode_for_vic(27)->vtotal != 312 || cea_mode_for_vic(28)->vtotal != 312
      make[4]: *** [~/pie-x86_kernel/kernel/scripts/Makefile.build:265: drivers/gpu/drm/drm_edid.o] Error 1
      
      Fixes: 7befe621 ("drm/edid: Abstract away cea_edid_modes[]")
      Signed-off-by: NMauro Rossi <issor.oruam@gmail.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200203213113.28183-1-issor.oruam@gmail.com
      e1cf35b9
  7. 22 12月, 2019 1 次提交
  8. 16 12月, 2019 4 次提交
  9. 29 11月, 2019 2 次提交
  10. 16 11月, 2019 1 次提交
  11. 23 10月, 2019 1 次提交
  12. 19 10月, 2019 3 次提交
  13. 10 10月, 2019 1 次提交
  14. 09 10月, 2019 1 次提交
    • L
      drm/edid: Select DMT timing if EDID's display feature not support GTF · bfef04ad
      Lee Shawn C 提交于
      Refer to EDID 1.3 spec, display FEATURE (byte 18h) bit #0 said
      "If this bit is set to 1, the display supports timings based on the
      GTF standard using default GTF parameter values".
      
      And EDID 1.4 spec shows "If bit 0 is set to 0, then the display
      is noncontinuous frequency (multi-mode) and is only specified to accept
      the video timing formats that are listed in BASE EDID and certain
      EXTENSION Blocks.
      
      When display feature did not support CVT or GFT2 and monitor's EDID version
      greater than or equal to "1.2". DRM driver would select GTF as default
      for standard timing calculation. It may generated some video timing
      that can't display properly by external monitor.
      
      For example. When driver retrieved "0xD1 0xFC" (FHD, 120Hz) and
      "0xD1 0xE8" (FHD, 100Hz) from "Standard Timings". GTF formula
      would generate video timing like below. It already over monitor's
      spec to cause black screen issue.
      "1920x1080" 120 368881 1920 2072 2288 2656 1080 1081 1084 1157 0x0 0x6
      "1920x1080" 100 301992 1920 2072 2280 2640 1080 1081 1084 1144 0x0 0x6
      
      v2: Just confirm GTF flag and omit the revision check.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Adam Jackson <ajax@redhat.com>
      Cc: Cooper Chiou <cooper.chiou@intel.com>
      Signed-off-by: NLee Shawn C <shawn.c.lee@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191007135127.9538-1-shawn.c.lee@intel.com
      bfef04ad
  15. 02 10月, 2019 1 次提交
  16. 20 9月, 2019 1 次提交
  17. 06 9月, 2019 1 次提交
    • D
      drm: Use EOPNOTSUPP, not ENOTSUPP · c7581a41
      Daniel Vetter 提交于
      - it's what we recommend in our docs:
      
      https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#recommended-ioctl-return-values
      
      - it's the overwhelmingly used error code for "operation not
        supported", at least in drm core (slightly less so in drivers):
      
      $ git grep EOPNOTSUPP -- drivers/gpu/drm/*c | wc -l
      83
      $ git grep ENOTSUPP -- drivers/gpu/drm/*c | wc -l
      5
      
      - include/linux/errno.h makes it fairly clear that these are for nfsv3
        (plus they also have error codes above 512, which is the block with
        some special behaviour ...)
      
      /* Defined for the NFSv3 protocol */
      
      If the above isn't reflecting current practice, then I guess we should
      at least update the docs.
      
      Noralf commented:
      
      Ben Hutchings made this comment[1] in a thread about use of ENOTSUPP in
      drivers:
      
        glibc's strerror() returns these strings for ENOTSUPP and EOPNOTSUPP
        respectively:
      
        "Unknown error 524"
        "Operation not supported"
      
      So at least for errors returned to userspace EOPNOTSUPP makes sense.
      
      José asked:
      
      > Hopefully this will not break any userspace
      
      None of the functions in drm_edid.c affected by this reach userspace,
      it's all driver internal.
      
      Same for the mipi function, that error code should be handled by
      drivers. Drivers are supposed to remap "the hw is on fire" to EIO when
      reporting up to userspace, but I think if a driver sees this it would
      be a driver bug.
      v2: Augment commit message with comments from Noralf and José
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Acked-by: NNoralf Trønnes <noralf@tronnes.org>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Andres Rodriguez <andresx7@gmail.com>
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190904143942.31756-1-daniel.vetter@ffwll.ch
      c7581a41
  18. 25 6月, 2019 2 次提交
  19. 12 6月, 2019 2 次提交
  20. 06 6月, 2019 2 次提交
  21. 24 5月, 2019 1 次提交
    • S
      drm/edid: Fix docbook in drm_hdmi_infoframe_set_hdr_metadata() · 6ac98829
      Sean Paul 提交于
      Fixes the following warnings:
      ../drivers/gpu/drm/drm_edid.c:4925: warning: Function parameter or member 'conn_state' not described in 'drm_hdmi_infoframe_set_hdr_metadata'
      ../drivers/gpu/drm/drm_edid.c:4925: warning: Excess function parameter 'hdr_metadata' description in 'drm_hdmi_infoframe_set_hdr_metadata'
      
      Fixes: 2cdbfd66 ("drm: Enable HDR infoframe support")
      Cc: Uma Shankar <uma.shankar@intel.com>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Hans Verkuil <hansverk@cisco.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-fbdev@vger.kernel.org
      Reviewed-by: NUma Shankar <uma.shankar@intel.com>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190523135504.184354-1-sean@poorly.run
      6ac98829
  22. 23 5月, 2019 3 次提交
  23. 07 5月, 2019 1 次提交