Jani Nikula
fff6172798
drm/i915: move a few HAS_ macros closer to their place
...
There's not that much organization with where the various HAS_FEATURE()
macros are placed, but at least try to group them closer together.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Nirmoy Das <nirmoy.das@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-4-jani.nikula@intel.com
2023-01-20 10:14:25 +02:00
Jani Nikula
0d885242f3
drm/i915: drop a number of unnecessary forward declarations
...
Remove leftovers from earlier cleanups.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Acked-by: Nirmoy Das <nirmoy.das@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-3-jani.nikula@intel.com
2023-01-20 10:14:18 +02:00
Jani Nikula
6c13c8250c
drm/i915: move I915_IDLE_ENGINES_TIMEOUT next to its only user
...
Declutter i915_drv.h. If there's ever a need to use this in more than
one place, we can figure out a better spot then. For now, this seems
easiest.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Acked-by: Nirmoy Das <nirmoy.das@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-2-jani.nikula@intel.com
2023-01-20 10:14:09 +02:00
Jani Nikula
ff1e93e924
drm/i915: add i915_config.h and move relevant declarations there
...
We already have i915_config.c. Add the i915_config.h counterpart, and
declutter i915_drv.h in the process.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Acked-by: Nirmoy Das <nirmoy.das@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-1-jani.nikula@intel.com
2023-01-20 10:13:50 +02:00
Dave Airlie
3f30a6e67c
Merge tag 'amd-drm-fixes-6.2-2023-01-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
...
amd-drm-fixes-6.2-2023-01-19:
amdgpu:
- Fix display scaling
- Fix RN/CZN power reporting on some firmware versions
- Colorspace fixes
- Fix resource freeing in error case in CS IOCTL
- Fix warning on driver unload
- GC11 fixes
- DCN 3.1.4/5 S/G display workarounds
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230119195908.7670-1-alexander.deucher@amd.com
2023-01-20 11:21:20 +10:00
Dave Airlie
6bb517df54
Merge tag 'drm-misc-fixes-2023-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
...
A fix for vc4 to address a memory leak when allocating a buffer, a
Kconfig fix for panfrost and two fixes for i915 and fb-helper to
address some bugs with vga-switcheroo.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20230119082059.h32bs7zqoxmjbcvn@houat
2023-01-20 11:17:40 +10:00
Dave Airlie
d6cf886fbd
Merge tag 'drm-intel-fixes-2023-01-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
...
- Reject display plane with height == 0 (Drew)
- re-disable RC6p on Sandy Bridge (Sasa)
- Fix hugepages' selftest (Chris)
- DG2 hw workarounds (Matt Atwood)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/Y8mf3/ANNWctpc7R@intel.com
2023-01-20 09:25:17 +10:00
ye xingchen
603a521ec2
drm/amd/display: remove duplicate included header files
...
resource.h is included more than once.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Marek Olšák
e3e84b0a03
drm/amdgpu: return the PCIe gen and lanes from the INFO ioctl
...
For computing PCIe bandwidth in userspace and troubleshooting PCIe
bandwidth issues. Note that this intentionally fills holes and padding
in drm_amdgpu_info_device.
Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20790
Signed-off-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Pierre-Eric Pelloux-Prayer
26fd808b01
drm/amdgpu: print bo inode number instead of ptr
...
This allows to correlate the infos printed by
/sys/kernel/debug/dri/n/amdgpu_gem_info to the ones found
in /proc/.../fdinfo and /sys/kernel/debug/dma_buf/bufinfo.
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Tao Zhou
071f526a13
drm/amdgpu: retire unused get_umc_v6_7_channel_index
...
Fix the following compile warning:
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:53:24: warning: unused function 'get_umc_v6_7_channel_index' [-Wunused-function]
static inline uint32_t get_umc_v6_7_channel_index(struct amdgpu_device *adev,
^
1 warning generated.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
YiPeng Chai
2cfb737b4b
drm/amdgpu: Optimize sdma ras block initialization code for sdma v4_0
...
Optimize sdma ras block initialization code for sdma v4_0.
Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Arnd Bergmann
3ba3c2db2f
drm/amd/display: fix hdmi_encoded_link_bw definition
...
Some of the data structures are hidden when CONFIG_DRM_AMD_DC_DCN is
disabled, which leads to a link failure:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:21: error: 'union hdmi_encoded_link_bw' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:42: error: parameter 2 ('hdmi_encoded_link_bw') has incomplete type
234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:232:17: error: function declaration isn't a prototype [-Werror=strict-prototypes]
232 | static uint32_t intersect_frl_link_bw_support(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'get_active_converter_info':
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1126:76: error: storage size of 'hdmi_encoded_link_bw' isn't known
1126 | union hdmi_encoded_link_bw hdmi_encoded_link_bw;
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1130:101: error: 'struct <anonymous>' has no member named 'MAX_ENCODED_LINK_BW_SUPPORT'
1130 | hdmi_color_caps.bits.MAX_ENCODED_LINK_BW_SUPPORT);
There is probably no need to hide the data structure, and removing
the #ifdef makes it build cleanly.
Fixes: d5a43956b7 ("drm/amd/display: move dp capability related logic to link_dp_capability")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Arnd Bergmann
5e3ec82c02
drm/amd/display: fix dp_retrieve_lttpr_cap() return value
...
gcc-13 notices a mismatch between the return type of dp_retrieve_lttpr_cap()
and the returned value:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'dp_retrieve_lttpr_cap':
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1465:24: error: implicit conversion from 'enum <anonymous>' to 'enum dc_status' [-Werror=enum-conversion]
1465 | return false;
| ^~~~~
Change the value to an actual dc_status code and remove the bogus
initialization that was apparently meant to get returned here.
Fixes: b473bd5fc3 ("drm/amd/display: refine wake up aux in retrieve link caps")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
YiPeng Chai
a57b24e170
drm/amdgpu: Add sdma ras function on sdma v6_0_3
...
Add sdma ras function on sdma v6_0_3.
Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Alex Deucher
9aa1537081
drm/amd/display: disable S/G display on DCN 3.1.4
...
Causes flickering or white screens in some configurations.
Disable it for now until we can fix the issue.
Cc: roman.li@amd.com
Cc: yifan1.zhang@amd.com
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:26 -05:00
Alex Deucher
3cc67fe1b3
drm/amd/display: disable S/G display on DCN 3.1.5
...
Causes flickering or white screens in some configurations.
Disable it for now until we can fix the issue.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2354
Cc: roman.li@amd.com
Cc: yifan1.zhang@amd.com
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Mario Limonciello
96b810d8c6
drm/amd: decrease message about missing PSP runtime database to debug
...
Laptops with APUs from a variety of manufacturers and generations
show a warning about a missing PSP runtime database.
As it's not required for PSP to dump this database into framebuffer,
decrease messages about it missing to debug.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Mario Limonciello
bd3149014d
drm/amd/display: Decrease messaging about DP alt mode state to debug
...
Currently plugging in a USB-C device that issues an HPD will emit
a warning level message `DP Alt mode state on HPD: %d`.
This is needlessly noisy for most people, decrease it to debug so
that it can be turned on by dynamic debug as needed.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Alex Deucher
6482ba5d4b
drm/amdgpu/vcn4: fail to schedule IB for AV1 if VCN0 is harvested
...
Only VCN0 supports AV1.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Alex Deucher
a6de636eb0
drm/amdgpu/soc21: don't expose AV1 if VCN0 is harvested
...
Only VCN0 supports AV1.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Alex Deucher
3c6f90f4aa
drm/amdgpu/vcn3: fail to schedule IB for AV1 if VCN0 is harvested
...
Only VCN0 supports AV1.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Alex Deucher
384334120b
drm/amdgpu/nv: don't expose AV1 if VCN0 is harvested
...
Only VCN0 supports AV1.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
Gustavo Sousa
3a06dec150
drm/i915/gt: Move LSC_CHICKEN_BIT* workarounds to correct function
...
That register doesn't belong to a specific engine, so the proper
placement for workarounds programming it should be
general_render_compute_wa_init().
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118155249.41551-3-gustavo.sousa@intel.com
2023-01-19 17:03:05 -05:00
Gustavo Sousa
0c3064cf33
drm/i915/doc: Document where to implement register workarounds
...
Extend the existing documentation in gt/intel_workarounds.c to make it
clear which functions register workarounds should be implemented in
according to their types.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118155249.41551-2-gustavo.sousa@intel.com
2023-01-19 17:03:05 -05:00
Dave Airlie
fc70e13dd1
Merge tag 'drm-msm-fixes-2023-01-16' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
...
msm-fixes for v6.3-rc5
Two GPU fixes which were meant to be part of the previous pull request,
but I'd forgotten to fetch from gitlab after the MR was merged so that
git tag was applied to the wrong commit.
- kexec shutdown fix
- fix potential double free
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Rob Clark <robdclark@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGskguoVsz2wqAK2k+f32LwcVY5JC6+e2RwLqZswz3RY2Q@mail.gmail.com
2023-01-20 07:49:01 +10:00
Neil Armstrong
ebd05c0e12
drm/panel: vtdr6130: fix unused ret in visionox_vtdr6130_bl_update_status
...
Fix the following warning:
panel-visionox-vtdr6130.c:249:12: warning: 'ret' is used uninitialized [-Wuninitialized]
Fixes: 9402cde934 ("drm/panel: vtdr6130: Use 16-bit brightness function")
Reported-by: Daniel Vetter <daniel@ffwll.ch >
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230119-topic-sm8550-vtdr6130-fixup-v1-1-82c4fb008138@linaro.org
2023-01-19 15:32:11 +01:00
Nirmoy Das
0220e4fe17
drm/i915: Fix a memory leak with reused mmap_offset
...
drm_vma_node_allow() and drm_vma_node_revoke() should be called in
balanced pairs. We call drm_vma_node_allow() once per-file everytime a
user calls mmap_offset, but only call drm_vma_node_revoke once per-file
on each mmap_offset. As the mmap_offset is reused by the client, the
per-file vm_count may remain non-zero and the rbtree leaked.
Call drm_vma_node_allow_once() instead to prevent that memory leak.
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Andi Shyti <andi.shyti@linux.intel.com >
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
Fixes: 7865559872 ("drm/i915/gem: Store mmap_offsets in an rbtree rather than a plain list")
Reported-by: Chuansheng Liu <chuansheng.liu@intel.com >
Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://lore.kernel.org/r/20230117175236.22317-2-nirmoy.das@intel.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
2023-01-19 14:17:05 +01:00
Nirmoy Das
899d3a3c19
drm/drm_vma_manager: Add drm_vma_node_allow_once()
...
Currently there is no easy way for a drm driver to safely check and allow
drm_vma_offset_node for a drm file just once. Allow drm drivers to call
non-refcounted version of drm_vma_node_allow() so that a driver doesn't
need to keep track of each drm_vma_node_allow() to call subsequent
drm_vma_node_revoke() to prevent memory leak.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Andi Shyti <andi.shyti@linux.intel.com >
Suggested-by: Chris Wilson <chris.p.wilson@intel.com >
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://lore.kernel.org/r/20230117175236.22317-1-nirmoy.das@intel.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
2023-01-19 14:16:55 +01:00
Jani Nikula
43bde505d6
drm/edid: move EDID BPC quirk application to update_display_info()
...
The BPC quirks are closer to home in update_display_info().
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8997e0fa3b0fd03c920e72d1dff24c0d96ff4dd0.1672826282.git.jani.nikula@intel.com
2023-01-19 14:04:15 +02:00
Jani Nikula
45ea02d1ca
drm/edid: merge ELD handling to update_display_info()
...
Simplify display info update by merging ELD handling as well as clearing
of the data in update_display_info().
The connector->eld really should be moved under display_info altogether,
but that's for another time.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1f2e7424b998fbcdd9cea488e7d6d7cbb26c460f.1672826282.git.jani.nikula@intel.com
2023-01-19 14:04:15 +02:00
Jani Nikula
4959b693d7
drm/edid: stop passing quirks around
...
Now that quirks are stored in display info, we can just look them up
using the connector instead of having to pass them around.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d55049dd9b2e48e63103f2dfa49bc9b25dd57f82.1672826282.git.jani.nikula@intel.com
2023-01-19 14:04:15 +02:00
Jani Nikula
783dedc535
drm/edid: store quirks in display info
...
Although the quirks are internal to EDID parsing, it'll be helpful to
store them in display info to avoid having to pass them around.
This will also help separate adding probed modes (which needs the
quirks) from updating display info.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/819b908f64ad2d158245917f436f24d33a65b95d.1672826282.git.jani.nikula@intel.com
2023-01-19 14:04:15 +02:00
Thomas Zimmermann
6f84981772
Merge drm/drm-next into drm-misc-next
...
Backmerging into drm-misc-next to get DRM accelerator infrastructure,
which is required by ipuv driver.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
2023-01-19 10:56:12 +01:00
Jani Nikula
cba83c1fc3
drm/edid: add helper for HDMI VSDB audio latency field length
...
Add a helper for skipping the HDMI VSDB audio latency fields.
There's a functional change for HDMI VSDB blocks that do not respect the
spec: "I_Latency_Fields_Present shall be zero if Latency_Fields_Present
is zero". We assume this to hold when skipping the latency fields, and
ignore non-zero I_Latency_Fields_Present if Latency_Fields_Present is
zero.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/da4293203ef2ddeb0bf66a2bfdbc129ab609c543.1672826282.git.jani.nikula@intel.com
2023-01-19 10:54:09 +02:00
Jani Nikula
1ee3e217f9
drm/edid: fix and clarify HDMI VSDB audio latency parsing
...
Add helpers for Latency_Fields_Present and I_Latency_Fields_Present
bits, and fix the parsing:
- Respect specification regarding "I_Latency_Fields_Present shall be
zero if Latency_Fields_Present is zero".
- Don't claim latency fields are present if the data block isn't big
enough to hold them.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/80426772a2d2e17bebf6f58d99b7d0cf6260c2d6.1672826282.git.jani.nikula@intel.com
2023-01-19 10:54:02 +02:00
Jani Nikula
c54e2e23c3
drm/edid: split CTA Y420VDB info and mode parsing
...
Separate the parsing of display info and modes from the CTA
Y420VDB. This is prerequisite work for overall better separation of the
two parsing steps.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3bc5fe6650a6ce4249803f7192096764ea724e05.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:54 +02:00
Jani Nikula
61e05fdc09
drm/edid: refactor CTA Y420CMDB parsing
...
Now that we have pre-parsed CTA VDB VICs stored in info->vics, leverage
that to simplify CTA Y420CMDB parsing. Move updating the y420_cmdb_modes
bitmap to the display info parsing stage, instead of updating it during
add modes. This allows us to drop the intermediate y420_cmdb_map from
display info, and replace it with a local variable.
This is prerequisite work for overall better separation of the two
parsing steps (updating display info and adding modes).
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7a0e5e99a83f203b6a8981d263b89b2bb7d2fe15.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:40 +02:00
Jani Nikula
26c2ff7734
drm/edid: rename struct drm_display_info *display to *info
...
Rename the local variable to info for consistency.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d35a50c714e21869afcabfafd5c5e590936b791a.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:36 +02:00
Jani Nikula
4ed29f398b
drm/edid: use VIC in AVI infoframe if sink lists it in CTA VDB
...
Apparently there are HDMI 1.4 compatible displays out there that support
VICs from specs later than CTA-861-D, i.e. VIC > 64, although HDMI 1.4
references CTA-861-D only.
We try to avoid using VICs from the later specs in the AVI infoframes to
avoid upsetting sinks that conform to earlier specs.
However, it seems reasonable to do this when the sink claims it supports
the VIC. With the pre-parsed list of VICs handy, this is now trivial.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/6153
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: William Tseng <william.tseng@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/775124fd07a5b7892e869becc3dd8dadb328ae5f.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:32 +02:00
Jani Nikula
6a40a75f71
drm/edid: Use the pre-parsed VICs
...
Now that we have all the VICs in info->vics, use them to simplify access
based on VIC index, i.e. on the order of VICs in the EDID, and avoid
passing CTA VDB pointers around.
This also fixes the highly unlikely scenarios of a) multiple HDMI VSDBs,
and b) HDMI VSDB 3D modes using VIC indexes that span across multiple
CTA VDBs, and the combination of the two.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/30f1a97193171e70ec1c26c4b685d8930799b9a6.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:28 +02:00
Jani Nikula
c3292ab5fb
drm/edid: parse VICs from CTA VDB early
...
A number of places need access to the VICs. Just parse them early for
easy access. Gracefully handle multiple CTA VDBs. It's unlikely to have
more than one, but the CTA-861 references "Video Data Block(s)", so err
on the safe side.
Start parsing them now, convert users in follow-up to have fewer moving
parts in one go.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7989b2b37837be68953c5d20afd3e93762bfd626.1672826282.git.jani.nikula@intel.com
2023-01-19 10:53:24 +02:00
Jani Nikula
72794d16bd
drm/edid: fix parsing of 3D modes from HDMI VSDB
...
Commit 537d9ed2f6 ("drm/edid: convert add_cea_modes() to use cea db
iter") inadvertently moved the do_hdmi_vsdb_modes() call within the db
iteration loop, always passing NULL as the CTA VDB to
do_hdmi_vsdb_modes(), skipping a lot of stereo modes.
Move the call back outside of the loop.
This does mean only one CTA VDB and HDMI VSDB combination will be
handled, but it's an unlikely scenario to have more than one of either
block, and it was not accounted for before the regression either.
Fixes: 537d9ed2f6 ("drm/edid: convert add_cea_modes() to use cea db iter")
Cc: <stable@vger.kernel.org > # v6.0+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/cf159b8816191ed595a3cb954acaf189c4528cc7.1672826282.git.jani.nikula@intel.com
2023-01-19 10:52:45 +02:00
Jani Nikula
1cbc1f0d32
drm/edid: fix AVI infoframe aspect ratio handling
...
We try to avoid sending VICs defined in the later specs in AVI
infoframes to sinks that conform to the earlier specs, to not upset
them, and use 0 for the VIC instead. However, we do this detection and
conversion to 0 too early, as we'll need the actual VIC to figure out
the aspect ratio.
In particular, for a mode with 64:27 aspect ratio, 0 for VIC fails the
AVI infoframe generation altogether with -EINVAL.
Separate the VIC lookup from the "filtering", and postpone the
filtering, to use the proper VIC for aspect ratio handling, and the 0
VIC for the infoframe video code as needed.
Reported-by: William Tseng <william.tseng@intel.com >
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6153
References: https://lore.kernel.org/r/20220920062316.43162-1-william.tseng@intel.com
Cc: <stable@vger.kernel.org >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c3e78cc6d01ed237f71ad0038826b08d83d75eef.1672826282.git.jani.nikula@intel.com
2023-01-19 10:52:34 +02:00
Arnd Bergmann
065ff1dc87
vc4: fix build failure in vc4_dsi_dev_probe()
...
The bridge->of_node field is defined inside of an #ifdef, which
results in a build failure when compile-testing the vc4_dsi driver
without CONFIG_OF:
drivers/gpu/drm/vc4/vc4_dsi.c: In function 'vc4_dsi_dev_probe':
drivers/gpu/drm/vc4/vc4_dsi.c:1822:20: error: 'struct drm_bridge' has no member named 'of_node'
1822 | dsi->bridge.of_node = dev->of_node;
Add another #ifdef in the place it is used in. Alternatively we
could consider dropping the #ifdef in the struct definition
and all other users.
Fixes: 78df640394 ("drm/vc4: dsi: Convert to using a bridge instead of encoder")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117165258.1979922-1-arnd@kernel.org
2023-01-19 09:16:04 +01:00
Randy Dunlap
04ee27671a
drm/connector: fix a kernel-doc bad line warning
...
Building the kernel documentation causes this warning 7 times.
Fix it by adding a " *" line instead of a blank line.
drivers/gpu/drm/drm_connector.c:1849: warning: bad line:
Fixes: 7d63cd8526 ("drm/connector: Add TV standard property")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
CC: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117070224.30751-1-rdunlap@infradead.org
2023-01-19 09:16:04 +01:00
Randy Dunlap
c25feb24e4
drm/atomic-helper: fix kernel-doc problems
...
Fix a kernel-doc warning and other kernel-doc formatting for
drm_atomic_helper_connect_tv_check().
drivers/gpu/drm/drm_atomic_state_helper.c:560: warning: Cannot understand * @drm_atomic_helper_connector_tv_check: Validate an analog TV connector state
on line 560 - I thought it was a doc line
Fixes: 5a28cefda3 ("drm/atomic-helper: Add an analog TV atomic_check implementation")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
CC: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117070216.30318-1-rdunlap@infradead.org
2023-01-19 09:16:04 +01:00
Alexander Stein
bd43a9844b
drm: bridge: ldb: Warn if LDB clock does not match requested link frequency
...
The LDB clock needs to be exactly 7-times the pixel clock used by the
display.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20221208065538.1753666-1-alexander.stein@ew.tq-group.com
2023-01-19 08:50:50 +01:00
Alexander Stein
f8593120e3
drm/bridge: sii902x: Use dev_err_probe
...
This helps figuring out why the device probe is deferred.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117105903.2068235-1-alexander.stein@ew.tq-group.com
2023-01-19 08:41:41 +01:00
Wadim Egorov
5688ca3469
drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
...
Switch to gpiod_set_value_cansleep() in sii902x_reset().
This is relevant if the reset line is tied to a I2C GPIO
controller.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20221228145704.939801-1-w.egorov@phytec.de
2023-01-19 08:39:43 +01:00