aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23drm/amdkfd: Print bdf in peer map failure messageHarish Kasiviswanathan1-2/+9
Print alloc node, peer node and memory domain when peer map fails. This is more useful v2: use dev_err instead of pr_err use bdf for identify peer gpu Reviewed-by: Felix Kuehling <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: 3.2.174Aric Cyr1-1/+1
This version brings along following fixes: - add debug option to bypass ssinfo from bios. - Refactor fixed VS logic for non-transparent mode - add cable ID support for usb c connector - clear remote dc_sink when stop mst - Ignore Transitional Invalid Link Rate Error Message - Fix wrong resolution with DP/VGA adapter - Refactor PSR DPCD caps detection - Set compbuf size to min at prep prevent overbook crb - lock/un-lock cursor if odm pipe split used Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Aric Cyr <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: add debug option to bypass ssinfo from bios.Charlene Liu3-0/+5
[Why&How] add debug option to bypass ssinfo from bios. Reviewed-by: Chris Park <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Charlene Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Refactor fixed VS logic for non-transparent modeGeorge Shen1-5/+97
[Why] All fixed VS/PE link training sequence should be refactored into a separate function outside of the standard link training sequence. This includes the sequence for non-transparent mode. [How] Isolate link training sequence for fixed VS/PE non-transparent mode into a separate function. Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: George Shen <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: add cable ID support for usb c connectorWenjing Liu7-41/+117
[how] Call to DMUB to retrieve usb c cable ID data from PD firmware. If cable id is retrieved from DMUB, skip reading cable ID from RX. Reviewed-by: George Shen <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Wenjing Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: clear remote dc_sink when stop mstWayne Lin1-1/+19
[Why] Currently, we don't have code path to release remote dc_sink when unplug MST hub from the system. After few times hotplug, we hit the limition of maximum number of remote dc_sink and can't light up new connected monitor anymore. [How] Releasing all remote dc_sink at dm_helpers_dp_mst_stop_top_mgr() was removed by previous patch. Restore it. Reviewed-by: Jerry Zuo <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Ignore Transitional Invalid Link Rate Error MessageFangzhi Zuo1-1/+1
[Why] When hotplug or unplug happens, each stream disabled one by one, and then enable any alived streams. Link phy and payload table is cleared when 1st stream is disabled. That causes the error message pops up when disable 2nd stream. There is no active stream after link_rate is cleared. After all streams are disabled, link will be trained again and link rate is assigned to any alived streams. Therefore there is no harm for the error message that represents invalid link rate value in the atomic reset transitional time period. [How] Downgrade the log level from ERROR to DEBUG. Reviewed-by: Wayne Lin <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Fangzhi Zuo <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Fix wrong resolution with DP/VGA adapterIlya2-0/+19
[Why] Hotplugging the VGA side of some DP/VGA adapters caused the display to light up with the wrong (non-native) resolution. This is caused by the adapter misbehaving by reporting the wrong number of downstream ports when the VGA side is unplugged (reports 1 instead of 0), but only if the SINK_COUNT DPCD register is read more than once. [How] To work around the adapter behavior, remove the sink if link is detected, but EDID cannot be read. Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Ilya <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Refactor PSR DPCD caps detectionPo Ting Chen6-57/+69
[Why] To move the PSR DPCD caps detection into detect_edp_sink_caps() Reviewed-by: Anthony Koo <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Po Ting Chen <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Set compbuf size to min at prep prevent overbook crbDuncan Ma2-2/+11
[Why] Detbuffer size is dynamically set for dcn31x. At certain moment, compbuf+(def size * num pipes) > config return buffer size causing flickering. This is easily reproducible when MPO is enabled with two displays. [How] At prepare BW, use the min comp buffer size. When it is to optimize BW, set compbuf size back to maximum possible size. Reviewed-by: Charlene Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Duncan Ma <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: lock/un-lock cursor if odm pipe split usedPaul Hsieh1-1/+6
[Why] When system resume from sleep, the cursor lock will be reset to default(lock status). And the cursor programming sequence doesn't consider about odm pipe split cause cursor can't be enabled. [How] If odm pipe split has been used, lock/un-lock on each pipes. Reviewed-by: Dmytro Laktyushkin <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Paul Hsieh <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Turn global functions into static functionsMaíra Canal7-8/+9
Turn previously global functions into static functions to avoid -Wmissing-prototype warnings, such as: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:20: warning: no previous prototype for function 'to_dal_irq_source_dcn30' [-Wmissing-prototypes] enum dc_irq_source to_dal_irq_source_dcn30( ^ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:1: note: declare 'static' if the function is not intended to be used outside of this translation unit enum dc_irq_source to_dal_irq_source_dcn30( ^ static 1 warning generated. drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:488:6: warning: no previous prototype for function 'dcn316_clk_mgr_helper_populate_bw_params' [-Wmissing-prototypes] void dcn316_clk_mgr_helper_populate_bw_params( ^ drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:488:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dcn316_clk_mgr_helper_populate_bw_params( ^ static 1 warning generated. v2: drop is_timing_changed hunk (Alex) Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Add missing prototypes to dcn201_initMaíra Canal1-0/+1
Include the header with the prototype to silence the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_init.c:127:6: warning: no previous prototype for function 'dcn201_hw_sequencer_construct' [-Wmissing-prototypes] void dcn201_hw_sequencer_construct(struct dc *dc) ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused variableMaíra Canal1-3/+0
Remove the variable clamshell_closed from the function dcn10_align_pixel_clocks. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2063:7: warning: variable 'clamshell_closed' set but not used [-Wunused-but-set-variable] bool clamshell_closed = false; ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variableMaíra Canal1-5/+0
Remove the unused struct irq_source_info_funcs dmub_outbox_irq_info_funcs from the file, which was declared but never hooked up. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:141:43: warning: unused variable 'dmub_outbox_irq_info_funcs' [-Wunused-const-variable] static const struct irq_source_info_funcs dmub_outbox_irq_info_funcs = { ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove vupdate_int_entry definitionMaíra Canal1-14/+0
Remove the vupdate_int_entry definition and utilization to avoid the following warning by Clang: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(0), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:404:2: note: previous initialization is here vupdate_int_entry(0), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:411:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(1), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:405:2: note: previous initialization is here vupdate_int_entry(1), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:412:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(2), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:406:2: note: previous initialization is here vupdate_int_entry(2), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:413:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(3), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:407:2: note: previous initialization is here vupdate_int_entry(3), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:414:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(4), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:408:2: note: previous initialization is here vupdate_int_entry(4), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:415:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(5), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:409:2: note: previous initialization is here vupdate_int_entry(5), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ 6 warnings generated. Fixes: 688f97ed3f5e ("drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1") Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk functionMaíra Canal1-16/+0
Remove dcn316_smu_set_voltage_via_phyclk function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_smu.c:171:5: warning: no previous prototype for function 'dcn316_smu_set_voltage_via_phyclk' [-Wmissing-prototypes] int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int requested_phyclk_khz) ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused temp variableMaíra Canal1-0/+4
Remove unused temp variable from the dmub_rb_flush_pending function by using arithmetic to remove the loop. The -Wunused-but-set-variable warning was pointed out by Clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2921:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable] uint64_t temp; ^ v2: squash in revert and comment update (Alex) Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: Remove unused get_umc_v8_7_channel_index functionMaíra Canal1-7/+0
Remove get_umc_v8_7_channel_index function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/umc_v8_7.c:50:24: warning: unused function 'get_umc_v8_7_channel_index' [-Wunused-function] static inline uint32_t get_umc_v8_7_channel_index(struct amdgpu_device *adev, ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: Change amdgpu_ras_block_late_init_default function scopeMaíra Canal1-1/+1
Turn previously global function into a static function to avoid the following Clang warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2459:5: warning: no previous prototype for function 'amdgpu_ras_block_late_init_default' [-Wmissing-prototypes] int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, ^ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2459:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, ^ static Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: use ktime rather than jiffies for benchmark resultsAlex Deucher1-14/+17
To protect against wraparounds. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: use kernel BO API for benchmark buffer managementAlex Deucher1-61/+17
Simplifies the code quite a bit. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: derive GTT display support from DMAlex Deucher3-27/+12
Rather than duplicating the logic in two places, consolidate the logic in the display manager. Acked-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu/display: split dmcu and gpuvm handling logicAlex Deucher1-15/+20
Separate the logic for each of these features to make the code easier to understand and update in the future. Acked-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: drop testing module parameterAlex Deucher5-273/+1
This test is not particularly useful now that GTT and GART are decoupled in the driver. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: drop benchmark module parameterAlex Deucher3-15/+0
Now that we expose the benchmarks via debugfs, there is no longer a need for the module parameter. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: expose benchmarks via debugfsAlex Deucher1-0/+23
They provide a nice smoke test of transfer performance using SDMA. Allow the user to run these at runtime rather than only at init time. v2: fix permissions (Alex) Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdkfd: Use real device for messagesFelix Kuehling3-10/+4
kfd_chardev() doesn't provide much useful information in dev_... messages on multi-GPU systems because there is only one KFD device, which doesn't correspond to any particular GPU. Use the actual GPU device to indicate the GPU that caused a message. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdkfd: Fix for possible integer overflowDavid Yat Sin1-1/+1
Fix for possible integer overflow when doing addition. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: David Yat Sin <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: add a benchmark mutexAlex Deucher3-9/+17
To avoid multiple runs in parallel to avoid mixing results. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: print the selected benchmark test in the logAlex Deucher1-1/+25
So you can tell which benchmark was run. v2: print the test description as well Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: plumb error handling though amdgpu_benchmark()Alex Deucher2-40/+66
So we can tell when this function fails. v2: squash in error handling fix (Alex) Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/i915/rps/tgl+: Remove RPS interrupt supportJosé Roberto de Souza1-1/+1
TGL+ and newer platforms don't support RPS up and low interruption limits. It is not used for broadwell and newer plaforms that supports execlist but here making sure that it is explicit not used even in debug scenarios. BSpec: 33301 BSpec: 52069 BSpec: 9520 HSD: 1405911647 Cc: Vinay Belgaumkar <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Reviewed-by: Anusha Srivatsa <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-02-23drm/i915/tgl: Simply subplatform detectionJosé Roberto de Souza6-34/+16
In the past we had a need to differentiate TGL U and TGL Y, there was a different voltage swing table for each subplatform and some PCI ids of this subplatforms are shared but it turned out that it was a specification mistake and the voltage swing table was indeed the same but we went ahead with that patch because we needed to differentiate TGL U and Y from TGL H and by that time TGL H was embargoed so that was the perfect way to land it upstream. Now the embargo for TGL H is long past and now we even have INTEL_TGL_12_GT1_IDS with all TGL H ids, so we can drop this PCI root check and only rely in the PCI ids to differentiate TGL U and Y from TGL H that actually has code differences. Besides the simplification this will fix issues in virtualization environments where the PCI root is virtualized and don't have the same id as actual hardware. v2: - add and set INTEL_SUBPLATFORM_UY Cc: Fred Gao <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Tested-by: Yu He <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-02-23drm/edid: Always set RGB444Maxime Ripard1-1/+1
In order to fill the drm_display_info structure each time an EDID is read, the code currently will call drm_add_display_info with the parsed EDID. drm_add_display_info will then call drm_reset_display_info to reset all the fields to 0, and then set them to the proper value depending on the EDID. In the color_formats case, we will thus report that we don't support any color format, and then fill it back with RGB444 plus the additional formats described in the EDID Feature Support byte. However, since that byte only contains format-related bits since the 1.4 specification, this doesn't happen if the EDID is following an earlier specification. In turn, it means that for one of these EDID, we end up with color_formats set to 0. The EDID 1.3 specification never really specifies what it means by RGB exactly, but since both HDMI and DVI will use RGB444, it's fairly safe to assume it's supposed to be RGB444. Let's move the addition of RGB444 to color_formats earlier in drm_add_display_info() so that it's always set for a digital display. Fixes: da05a5a71ad8 ("drm: parse color format support for digital displays") Cc: Ville Syrjälä <[email protected]> Reported-by: Matthias Reichl <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-02-23drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD ↵Hans de Goede1-0/+3
panels Some devices use e.g. a portrait panel in a standard laptop casing made for landscape panels. efifb calls drm_get_panel_orientation_quirk() and sets fb_info.fbcon_rotate_hint to make fbcon rotate the console so that it shows up-right instead of on its side. When switching to simpledrm the fbcon renders on its side. Call the drm_connector_set_panel_orientation_with_quirk() helper to add a "panel orientation" property on devices listed in the quirk table, to make the fbcon (and aware userspace apps) rotate the image to display properly. Cc: Javier Martinez Canillas <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-02-23drm/tegra: dpaux: Populate AUX busThierry Reding2-0/+8
The DPAUX hardware block exposes an DP AUX interface that provides access to an AUX bus and the devices on that bus. Use the DP AUX bus infrastructure that was recently introduced to probe devices on this bus from DT. Signed-off-by: Thierry Reding <[email protected]>
2022-02-23drm/i915: Extract intel_bw_check_data_rate()Ville Syrjälä1-21/+34
Extract the data rate calculation loop out from intel_bw_atomic_check() to make it a bit less confusing. v2: Deal with 'bool changed' Reviewed-by: Stanislav Lisovskiy <[email protected]> #v1 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2022-02-23drm/i915: Extract icl_qgv_points_mask()Ville Syrjälä1-13/+22
Declutter intel_bw_atomic_check() a bit by pulling the max QGV mask calculation out. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Stanislav Lisovskiy <[email protected]>
2022-02-23drm/i915: Properly clear crtc state when disabling it fully, againVille Syrjälä1-3/+5
Currently we just leave the old gunk lying around in the crtc state when userspace asks us to fully disable the crtc. That doesn't match what the state would be had we never even enabled the crtc in the first place. So let's make this consistent and call intel_crtc_prepare_cleared_state() for disabled crtcs as well (excluding bigjoiner slaves of course which have had their state copied from the master). I actually already did this once in commit fff13e63a141 ("drm/i915: Clear most of crtc state when disabling the crtc") but then commit 19f65a3dbf75 ("drm/i915: Try to make bigjoiner work in atomic check") undid it all :( Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-02-23drm/i915: Remove odd any_ms=true assignmentVille Syrjälä1-3/+1
For some reason we're flagging that we need to run through the full modeset calculations (any_ms==true -> do cdclk/etc. checks) if any crtc got initially flagged for a modeset and is not enabled via the uapi. No idea why this is here since later on (after all fastset handling) we do full run through the crtcs and flag any_ms if anything still needs a full modeset. So let's just throw out this early weirdo. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-02-23drm/i915: Dump hw.enable and pipe_modeVille Syrjälä1-2/+5
Include hw.enable and pipe_mode in the crtc debugfs state dump. These are fairly fundemental to the operation of the driver so not seeing them leaves us in the dark. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-02-23drm/i915: Dump the crtc hw state alwaysVille Syrjälä1-9/+7
Let's just dump the "full" hw crtc state in debugs so that we can see if some stale junk was left behind when the crtc is supposed to be entirely off. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
2022-02-23Merge branches 'msm-next-lumag-dpu' and 'msm-next-lumag-dsi' into msm-next-lumagDmitry Baryshkov47-462/+658
2022-02-23drm/msm/dpu: wire up MSM8998's DSPP blocksDmitry Baryshkov1-0/+2
The commit adding msm8998 support didn't added msm8998's DSPP blocks configuration, but did not use them in msm8998_cfg_init(). Wire them up to be used for display post processing. Reported-by: kernel test robot <[email protected]> Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Jami Kettunen <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/475544/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2022-02-23drm/selftests: add drm buddy pathological testcaseArunpravin2-0/+131
create a pot-sized mm, then allocate one of each possible order within. This should leave the mm with exactly one page left. Free the largest block, then whittle down again. Eventually we will have a fully 50% fragmented mm. v2(Matthew Auld): - removed unnecessary test succeeded print - replace list_del()/list_add_tail() with list_move_tail() Signed-off-by: Arunpravin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2022-02-23drm/selftests: add drm buddy smoke testcaseArunpravin2-0/+140
- add a test to ascertain that the critical functionalities of the program is working fine - add a timeout helper function v2: - removed unnecessary test succeeded print - replace list_del()/list_add_tail() with list_move_tail() Signed-off-by: Arunpravin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2022-02-23drm/selftests: add drm buddy pessimistic testcaseArunpravin2-0/+148
create a pot-sized mm, then allocate one of each possible order within. This should leave the mm with exactly one page left. v2: - removed unnecessary test succeeded print - replace list_del()/list_add_tail() with list_move_tail() Signed-off-by: Arunpravin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2022-02-23drm/selftests: add drm buddy optimistic testcaseArunpravin2-0/+81
create a mm with one block of each order available, and try to allocate them all. v2(Matthew Auld): - removed unnecessary test succeeded print - replace list_del()/list_add_tail() with list_move_tail() Signed-off-by: Arunpravin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2022-02-23drm/selftests: add drm buddy alloc range testcaseArunpravin5-5/+414
- add a test to check the range allocation - export get_buddy() function in drm_buddy.c - export drm_prandom_u32_max_state() in lib/drm_random.c - include helper functions - include prime number header file v2: - add drm_get_buddy() function description (Matthew Auld) - removed unnecessary test succeeded print Signed-off-by: Arunpravin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>