1. 26 7月, 2017 1 次提交
  2. 18 7月, 2017 1 次提交
  3. 15 7月, 2017 6 次提交
    • S
      drm: add helper functions for YCBCR420 handling · 2570fe25
      Shashank Sharma 提交于
      This patch adds helper functions for YCBCR 420 handling.
      These functions do:
      - check if a given video mode is YCBCR 420 only mode.
      - check if a given video mode is YCBCR 420 also mode.
      
      V2: Added YCBCR functions as helpers in DRM layer, instead of
          keeping it in I915 layer.
      V3: Added handling for YCBCR-420 only modes too.
      V4: EXPORT_SYMBOL(drm_find_hdmi_output_type)
      V5: Addressed review comments from Danvet:
          - %s/drm_find_hdmi_output_type/drm_display_info_hdmi_output_type
          - %s/drm_can_support_ycbcr_output/drm_display_supports_ycbcr_output
          - %s/drm_can_support_this_ycbcr_output/
      		drm_display_supports_this_ycbcr_output
          - pass drm_display_info instead of drm_connector for consistency
          - For drm_get_highest_quality_ycbcr_supported doc, move the variable
            description above, and then the function description.
      V6: Add only YCBCR420 helpers (Ville)
      V7: Addressed review comments from Ville
          - Remove cea_vic_valid() check.
          - Fix indentation.
          - Make input parameters to helpers, const.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Jose Abreu <Jose.Abreu@synopsys.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-9-git-send-email-shashank.sharma@intel.com
      [vsyrjala: Fix sparse indentation warn]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      2570fe25
    • S
      drm/edid: parse ycbcr 420 deep color information · e6a9a2c3
      Shashank Sharma 提交于
      CEA-861-F spec adds ycbcr420 deep color support information
      in hf-vsdb block. This patch extends the existing hf-vsdb parsing
      function by adding parsing of ycbcr420 deep color support from the
      EDID and adding it into display information stored.
      
      V2: Rebase
      V3: Rebase
      V4: Moved definition of y420_dc_modes into this patch, where its used
          (Ville)
      V5: Optimize function, if(conditions) not reqd (Ville)
      V6: Rebase
      V7: Rebase
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-8-git-send-email-shashank.sharma@intel.com
      [vsyrjala: Fix sparse indentation warn]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      e6a9a2c3
    • S
      drm/edid: parse YCBCR420 videomodes from EDID · 832d4f2f
      Shashank Sharma 提交于
      HDMI 2.0 spec adds support for YCBCR420 sub-sampled output.
      CEA-861-F adds two new blocks in EDID's CEA extension blocks,
      to provide information about sink's YCBCR420 output capabilities.
      
      These blocks are:
      
      - YCBCR420vdb(YCBCR 420 video data block):
      This block contains VICs of video modes, which can be sopported only
      in YCBCR420 output mode (Not in RGB/YCBCR444/422. Its like a normal
      SVD block, valid for YCBCR420 modes only.
      
      - YCBCR420cmdb(YCBCR 420 capability map data block):
      This block gives information about video modes which can support
      YCBCR420 output mode also (along with RGB,YCBCR444/422 etc) This
      block contains a bitmap index of normal svd videomodes, which can
      support YCBCR420 output too.
      So if bit 0 from first vcb byte is set, first video mode in the svd
      list can support YCBCR420 output too. Bit 1 means second video mode
      from svd list can support YCBCR420 output too, and so on.
      
      This patch adds two bitmaps in display's hdmi_info structure, one each
      for VCB and VDB modes. If the source is HDMI 2.0 capable, this patch
      adds:
      - VDB modes (YCBCR 420 only modes) in connector's mode list, also makes
        an entry in the vdb_bitmap per vic.
      - VCB modes (YCBCR 420 also modes) only entry in the vcb_bitmap.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      
      V2: Addressed
          Review comments from Emil:
          - Use 1ULL<<i instead of 1<<i to make sure the output is 64bit.
          - Use the suggested method for updating dbmap.
          - Add documentation for YCBCR420_vcb_map to fix kbuild warning.
      
          Review comments from Ville:
          - Do not expose the YCBCR420 flags in uabi layer, keep it internal.
          - Save a map of YCBCR420 modes for future reference.
          - Check db length before trying to parse extended tag.
          - Add a warning if there are > 64 modes in capability map block.
          - Use y420cmdb in function names and macros while dealing with vcb
            to be aligned with spec.
          - Move the display information parsing block ahead of mode parsing
            blocks.
      
      V3: Addressed design/review comments from Ville
          - Do not add flags in video modes, else we have to expose them to user
          - There should not be a UABI change, and kernel should detect the
            choice of the output based on type of mode, and the bitmaps.
          - Use standard bitops from kernel bitmap header, instead of calculating
            bit positions manually.
      
      V4: Addressed review comments from Ville:
          - s/ycbcr_420_vdb/y420vdb
          - s/ycbcr_420_vcb/y420cmdb
          - Be less verbose on description of do_y420vdb_modes
          - Move newmode variable in the loop scope.
          - Use svd_to_vic() to get a VIC, instead of 0x7f
          - Remove bitmap description for CMDB modes & VDB modes
          - Dont add connector->ycbcr_420_allowed check for cmdb modes
          - Remove 'len' variable, in is_y420cmdb function, which is used
            only once
          - Add length check in is_y420vdb function
          - Remove unnecessary if (!db) check in function parse_y420cmdb_bitmap
          - Do not add print about YCBCR 420 modes
          - Fix indentation in few places
          - Move ycbcr420_dc_modes in next patch, where its used
          - Add a separate patch for movement of drm_add_display_info()
      
      V5: Addressed review comments from Ville:
          - Add the patch which cleans up the current EXTENDED_TAG usage
          - Make y420_cmdb_map u64
          - Do not block ycbcr420 modes while parsing the EDID, rather
            add a separate helper function to prune ycbcr420-only modes from
            connector's probed modes.
      
      V6: Rebase
      V7: Move this patch after the 420_only validation patch (Ville)
      V8: Addressed review comments from Ville
          - use cea_vic_valid check before adding cmdb/vdb modes
          - add check for i < 64 while adding cmdb modes
          - use 1ULL while checking bitmap
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1500028426-14883-1-git-send-email-shashank.sharma@intel.com
      [vsyrjala: Fix checkpatch complaints and indentation]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      832d4f2f
    • S
      drm: add helper to validate YCBCR420 modes · d8523153
      Shashank Sharma 提交于
      YCBCR420 modes are supported only on HDMI 2.0 capable sources.
      This patch adds:
      - A drm helper to validate YCBCR420-only mode on a particular
        connector. This function will help pruning the YCBCR420-only
        modes from the connector's modelist.
      - A bool variable (ycbcr_420_allowed) in the drm connector structure.
        While handling the EDID from HDMI 2.0 sinks, its important to know
        if the source is capable of handling YCBCR420 output, so that no
        YCBCR 420 modes will be listed for sources which can't handle it.
        A driver should set this variable if it wants to see YCBCR420 modes
        in the modedb.
      
      V5: Introduced the patch in series.
      V6: Squashed two patches (validate YCBCR420 and add YCBCR420
      	   identifier)
      V7: Addressed review comments from Vile:
          - Move this patch before we add 420 modes from EDID.
          - No need for drm_valid_cea_vic() check, function back to non-static.
          - Update MODE_STATUS with NO_420 condition.
          - Introduce y420_vdb_modes variable in this patch
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-6-git-send-email-shashank.sharma@intel.com
      [vsyrjala: Drop the now bogus EXPORT_SYMBOL(drm_valid_cea_vic)]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      d8523153
    • S
      drm: handle HDMI 2.0 VICs in AVI info-frames · 0c1f528c
      Shashank Sharma 提交于
      HDMI 1.4b support the CEA video modes as per range of CEA-861-D (VIC 1-64).
      For any other mode, the VIC filed in AVI infoframes should be 0.
      HDMI 2.0 sinks, support video modes range as per CEA-861-F spec, which is
      extended to (VIC 1-107).
      
      This patch adds a bool input variable, which indicates if the connected
      sink is a HDMI 2.0 sink or not. This will make sure that we don't pass a
      HDMI 2.0 VIC to a HDMI 1.4 sink.
      
      This patch touches all drm drivers, who are callers of this function
      drm_hdmi_avi_infoframe_from_display_mode but to make sure there is
      no change in current behavior, is_hdmi2 is kept as false.
      
      In case of I915 driver, this patch:
      - checks if the connected display is HDMI 2.0.
      - HDMI infoframes carry one of this two type of information:
      	- VIC for 4K modes for HDMI 1.4 sinks
      	- S3D information for S3D modes
        As CEA-861-F has already defined VICs for 4K videomodes, this
        patch doesn't allow sending HDMI infoframes for HDMI 2.0 sinks,
        until the mode is 3D.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Jose Abreu <jose.abreu@synopsys.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      
      PS: This patch touches a few lines in few files, which were
      already above 80 char, so checkpatch gives 80 char warning again.
      - gpu/drm/omapdrm/omap_encoder.c
      - gpu/drm/i915/intel_sdvo.c
      
      V2: Rebase, Added r-b from Andrzej
      V3: Addressed review comment from Ville:
      	- Do not send VICs in both AVI-IF and HDMI-IF
      	  send only one of it.
      V4: Rebase
      V5: Added r-b from Neil.
          Addressed review comments from Ville
          - Do not block HDMI vendor IF, instead check for VIC while
            handling AVI infoframes
      V6: Rebase
      V7: Rebase
      Reviewed-by: NAndrzej Hajda <a.hajda@samsung.com>
      Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-2-git-send-email-shashank.sharma@intel.comSigned-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      0c1f528c
    • N
      drm/tinydrm: Add tinydrm_xrgb8888_to_gray8() helper · 379ea9a1
      Noralf Trønnes 提交于
      Drm has no monochrome or greyscale support so add a conversion
      from the common format XR24.
      
      Also reorder includes into the common order.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NNoralf Trønnes <noralf@tronnes.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/1496934875-51984-4-git-send-email-noralf@tronnes.org
      379ea9a1
  4. 14 7月, 2017 2 次提交
  5. 06 7月, 2017 2 次提交
  6. 03 7月, 2017 1 次提交
    • G
      drm/atomic: initial support for asynchronous plane update · fef9df8b
      Gustavo Padovan 提交于
      In some cases, like cursor updates, it is interesting to update the
      plane in an asynchronous fashion to avoid big delays. The current queued
      update could be still waiting for a fence to signal and thus block any
      subsequent update until its scan out. In cases like this if we update the
      cursor synchronously through the atomic API it will cause significant
      delays that would even be noticed by the final user.
      
      This patch creates a fast path to jump ahead the current queued state and
      do single planes updates without going through all atomic steps in
      drm_atomic_helper_commit(). We take this path for legacy cursor updates.
      
      For now only single plane updates are supported, but we plan to support
      multiple planes updates and async PageFlips through this interface as well
      in the near future.
      
      v6:	- move check code to drm_atomic_helper.c (Daniel Vetter)
      
      v5:
      	- improve comments (Eric Anholt)
      
      v4:
      	- fix state->crtc NULL check (Archit Taneja)
      
      v3:
      	- fix iteration on the wrong crtc state
      	- put back code to forbid updates if there is a queued update for
      	the same plane (Ville Syrjälä)
      	- move size checks back to drivers (Ville Syrjälä)
      	- move ASYNC_UPDATE flag addition to its own patch (Ville Syrjälä)
      
      v2:
      	- allow updates even if there is a queued update for the same
      	plane.
              - fixes on the documentation (Emil Velikov)
              - unconditionally call ->atomic_async_update (Emil Velikov)
              - check for ->atomic_async_update earlier (Daniel Vetter)
              - make ->atomic_async_check() the last step (Daniel Vetter)
              - add ASYNC_UPDATE flag (Eric Anholt)
              - update state in core after ->atomic_async_update (Eric Anholt)
      	- update docs (Eric Anholt)
      
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.com>
      Reviewed-by: Archit Taneja <architt@codeaurora.org> (v5)
      Acked-by: Eric Anholt <eric@anholt.net> (v5)
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170630180322.29007-2-gustavo@padovan.org
      fef9df8b
  7. 30 6月, 2017 1 次提交
  8. 28 6月, 2017 1 次提交
    • D
      drm/vblank: Unexport drm_vblank_cleanup · b4164d66
      Daniel Vetter 提交于
      There's no reason for drivers to call this, and all the ones I've
      removed looked very fishy:
      - Proper quiescenting of the vblank machinery should be done by
        calling drm_crtc_vblank_off(), which is best done by shutting down
        the entire display engine with drm_atomic_helper_shutdown.
      
      - Releasing of allocated memory is done by the core already, it calls
        drm_vblank_cleanup as a fallback.
      
      - drm_vblank_cleanup also has checks for drivers which forget to clean
        up vblank interrupts.
      
      This essentially reverts
      
      commit e77cef9c
      Author: Jerome Glisse <jglisse@redhat.com>
      Date:   Thu Jan 7 15:39:13 2010 +0100
      
          drm: Avoid calling vblank function is vblank wasn't initialized
      
      which was done to fix a bug in radeon code with msi interrupts:
      
      commit 003e69f9
      Author: Jerome Glisse <jglisse@redhat.com>
      Date:   Thu Jan 7 15:39:14 2010 +0100
      
          drm/radeon/kms: Don't try to enable IRQ if we have no handler installed
      
      Afaict from digging around in old code, this was needed to avoid
      blowing up in the ums fallback, and has stopped serving it's purpose
      long ago - if irq init fails, the driver fails to load, and there's
      really no way to blow up anymore.
      
      Long story short, this was most likely a small ums compat/fallback
      hack that became a thing of it's own and got cargo-cult duplicated all
      over the drm codebase for essentially no gain at all.
      
      v2: Mention that for drivers with a ->release callback cleanup is
      handled by drm_dev_fini() (Thierry).
      
      Cc: Thierry Reding <treding@nvidia.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170626161949.25629-2-daniel.vetter@ffwll.ch
      b4164d66
  9. 22 6月, 2017 1 次提交
  10. 20 6月, 2017 6 次提交
  11. 15 6月, 2017 1 次提交
  12. 14 6月, 2017 1 次提交
    • D
      drm: introduce sync objects (v4) · e9083420
      Dave Airlie 提交于
      Sync objects are new toplevel drm object, that contain a
      pointer to a fence. This fence can be updated via command
      submission ioctls via drivers.
      
      There is also a generic wait obj API modelled on the vulkan
      wait API (with code modelled on some amdgpu code).
      
      These objects can be converted to an opaque fd that can be
      passes between processes.
      
      v2: rename reference/unreference to put/get (Chris)
      fix leaked reference (David Zhou)
      drop mutex in favour of cmpxchg (Chris)
      v3: cleanups from danvet, rebase on drm_fops rename
      check fd_flags is 0 in ioctls.
      v4: export find/free, change replace fence to take a
      syncobj. In order to support lookup first, replace
      later semantics which seem in the end to be cleaner.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e9083420
  13. 10 6月, 2017 3 次提交
  14. 09 6月, 2017 1 次提交
  15. 07 6月, 2017 2 次提交
  16. 05 6月, 2017 2 次提交
  17. 02 6月, 2017 1 次提交
  18. 01 6月, 2017 2 次提交
  19. 31 5月, 2017 3 次提交
  20. 30 5月, 2017 2 次提交