OSDN Git Service

drm/i915/dp: Replace intel_dp.dfp members with the new crtc_state sink_format
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 27 Apr 2023 12:56:01 +0000 (18:26 +0530)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 5 May 2023 15:12:02 +0000 (18:12 +0300)
commit68910c2a903d518b3f7386901cf0d6a053d1c028
tree76e85d65391db1456b31abc6c2498d77747e1be8
parenta04d27cdafb1caf95e6dc15ac72374c36e38acad
drm/i915/dp: Replace intel_dp.dfp members with the new crtc_state sink_format

The decision to use DFP output format conversion capabilities should be
during compute_config phase.

This patch uses the members of intel_dp->dfp to only store the
format conversion capabilities of the DP device and uses the crtc_state
sink_format member, to program the protocol-converter for
colorspace/format conversion.

v2: Use sink_format to determine the color conversion config for the
pcon (Ville).

v3: Fix typo: missing 'break' in switch case (lkp kernel test robot).

v4: Add helper to check if DP supports YCBCR420.

v5: Simplify logic for computing output_format, based on the given
sink_format. (Ville).
Added scaler constraint for YCbCr420 output.

v6: Split the patch for Scaler constraint for Ycbcr420.

v7: Simplify the policy for selecting output_format:
Always try for RGB first, followed by YCBCR444, and finally by YCBCR420.

v8: Removed redundant comments, minor refactoring. (Ville)

v9: Added member for ycbcr420 passthrough cap, fixed minor issues. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230427125605.487769-3-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp.c