aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03drm/amd/display: Add dpia display mode validation logicMeenakshikumar Somasundaram5-40/+104
[Why] If bandwidth allocation feature is enabled, connection manager wont limit the dp tunnel bandwidth. So, need to do display mode validation for streams on dpia links to avoid oversubscription of dp tunnel bandwidth. [How] - To read non reduced link rate and lane count and update reported link capability. - To calculate the bandwidth required for streams of dpia links per host router and validate against the allocated bandwidth for the host router. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: PeiChen Huang <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Meenakshikumar Somasundaram <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Switch DMCUB notify idle command to NO_WAITNicholas Kazlauskas1-1/+2
[Why] Race condition between notification of driver idle and the command being processed. We could theoretically enter idle between the submission and the wait for idle that occurs after. [How] Switch the notification to NO_WAIT to avoid the RPTR access. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Sung joon Kim <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2Jack Xiao1-1/+47
It's required to take the gfx mutex before access to CP_VMID_RESET, for there is a race condition with CP firmware to write the register. v2: add extra code to ensure the mutex releasing is successful. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Wait forever for DMCUB to wake upNicholas Kazlauskas1-12/+2
[Why] If we time out waiting for PMFW to finish the exit sequence and touch the DMCUB register the system will hang in a hard locked state. [How] Pol forever. This covers the case where things take too long but also enables for debugging to occur since the cores won't be hardlocked. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Sung joon Kim <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Always exit DMCUB idle when calledNicholas Kazlauskas1-3/+0
[Why] dc->idle_optimizations_allowed may be desynced with the hardware state. [How] Make sure we always exit out when dc_dmub_srv_exit_low_power_state is called by removing the check. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Sung joon Kim <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Add log end specifierRelja Vojvodic1-1/+1
[Why] Some debug tools, sometimes wrap around to multiple lines which causes issues with the DPM test script while it is looking for the logs. Need a way to tell when the log is finished. [How] Added "LOG_END" to the end of the log. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Alvin Lee <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Relja Vojvodic <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Assign stream status for FPO + Vactive casesAlvin Lee1-1/+2
A new check was added to ensure FPO is not enabled when the FPO pipe has 0 planes. This requires the stream status to check the plane count, but the stream status was not assigned for FPO + Vactive cases which leads to FPO not be enabled always. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Relja Vojvodic <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amdgpu: Let KFD sync with VM fencesFelix Kuehling1-1/+2
Change the rules for amdgpu_sync_resv to let KFD synchronize with VM fences on page table reservations. This fixes intermittent memory corruption after evictions when using amdgpu_vm_handle_moved to update page tables for VM mappings managed through render nodes. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: pbn_div need be updated for hotplug eventWayne Lin1-2/+1
link_rate sometime will be changed when DP MST connector hotplug, so pbn_div also need be updated; otherwise, it will mismatch with link_rate, causes no output in external monitor. Cc: [email protected] Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Jerry Zuo <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Wade Wang <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Correctly restore user_levelCamille Cho13-20/+42
[Why] BL1_PWM_USER_LEVEL is meant for the user brightness level setting from OS. However, we update it along with other ABM levels to the real PWM value which could be ABMed. [How] Driver to cache and restore the user brightness level setting so that DMUB can retrieve the last user setting in ABM config initialization. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Camille Cho <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Fix minor issues in BW Allocation Phase2Meenakshikumar Somasundaram2-124/+101
[Why] Fix minor issues in BW Allocation Phase2. [How] - In set_usb4_req_bw_req(), link->dpia_bw_alloc_config.response_ready flag should be reset before writing DPCD REQUEST_BW. - Fix the granularity for value of 2 in get_bw_granularity(). - Removed bandwidth allocation support display fw boot option as the fw would read feature enable status from bios. - Clean up DPIA_EST_BW_CHANGED and DPIA_BW_REQ_SUCCESS cases in dpia_handle_bw_alloc_response(). - Removed allocate_usb4_bw and deallocate_usb4_bw. - Optimized loop in get_lowest_dpia_index(). - Updated link_dp_dpia_allocate_usb4_bandwidth_for_stream() and set_usb4_req_bw_req() to always issue request bw. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: PeiChen Huang <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Meenakshikumar Somasundaram <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Add null pointer guards where neededJosip Pavic3-1/+10
[Why] Some functions whose output is typically checked for null are not being checked for null at several call sites, causing some static analysis tools to throw an error. [How] Add null pointer guards around functions that typically have them at other call sites. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Sung Lee <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Josip Pavic <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Add HDMI capacity computations using fixed31_32Leo (Hanghong) Ma3-3/+3
[Why] Certain HDMI modes failed at dml cap check for uncompressed video but they can still be supported for compressed video. [How] Add HDMI capacity computations using fixed31_32 in dc side. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Chris Park <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Leo (Hanghong) Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Add more mechanisms for testsRelja Vojvodic5-90/+229
[Why] More information is desired for the test tools. [How] Refactored get_subvp_visual_confirm_color and get_mclk_switch_visual_confirm_color to support the new method of storing the p_state type, which was changed so that it could also be saved and output by the DPM log. Ensured that the p_state type is kept updated by looping through the pipes within commit_planes_for_stream. Tested-by: Daniel Wheeler <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Alvin Lee <[email protected]> Signed-off-by: Relja Vojvodic <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Don't allow FPO if no planesAlvin Lee3-5/+25
In DCN32/321 FPO uses per-pipe P-State force. If there is no plane, then then HUBP is power gated, in which case any programming in HUBP has no effect and the pipe is always asserting P-State allow. This is contrary to what we want to happen for FPO (FW should moderate the P-State assertion), so block FPO if there's no plane for the FPO pipe. Tested-by: Daniel Wheeler <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Samson Tam <[email protected]> Reviewed-by: Chaitanya Dhere <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Fix subvp+drr logic errorsAlvin Lee1-22/+30
[Why] There is some logic error where the wrong variable was used to check for OTG_MASTER and DPP_PIPE. [How] Add booleans to confirm that the expected pipes were found before validating schedulability. Tested-by: Daniel Wheeler <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Samson Tam <[email protected]> Reviewed-by: Chaitanya Dhere <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amdgpu: Fix ecc irq enable/disable unpairedStanley.Yang4-1/+38
The ecc_irq is disabled while GPU mode2 reset suspending process, but not be enabled during GPU mode2 reset resume process. Changed from V1: only do sdma/gfx ras_late_init in aldebaran_mode2_restore_ip delete amdgpu_ras_late_resume function Changed from V2: check umc ras supported before put ecc_irq Signed-off-by: Stanley.Yang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: enable dcn35 idle power optimizationRoman Li1-1/+1
[Why] Idle power optimization was disabled on dcn35 by default. [How] Enable by setting disable_idle_power_optimizations to false. Signed-off-by: Roman Li <[email protected]> Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: Disable IPS by defaultRoman Li1-0/+2
[Why] Instability is observed on DCN35 if idle power optimization is enabled. [How] Disable IPS until issue is resolved. Signed-off-by: Roman Li <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amdgpu: Add register read/write debugfs support for AID'sMangesh Gadre1-2/+9
SMN address is larger than 32 bits for registers on different AID's Updating existing interface to support access to such registers. Signed-off-by: Mangesh Gadre <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Asad Kamal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03drm/amd/display: remove redundant initialization of variable remainderColin Ian King1-1/+2
Variable remainder is being initialized with a value that is never read, the assignment is redundant and can be removed. Also add a newline after the declaration to clean up the coding style. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-01-03Merge branches 'apple/dart', 'arm/rockchip', 'arm/smmu', 'virtio', ↵Joerg Roedel1-7/+2
'x86/vt-d', 'x86/amd' and 'core' into next
2024-01-02drm/i915/guc: Change wa and EU_PERF_CNTL registers to MCR typeShuicheng Lin1-8/+13
Some of the wa registers are MCR register, and EU_PERF_CNTL registers are MCR register. MCR register needs extra process for read/write. As normal MMIO register also could work with the MCR register process, change all wa registers to MCR type for code simplicity. Signed-off-by: Shuicheng Lin <[email protected]> Cc: Matt Roper <[email protected]> Cc: Umesh Nerlige Ramappa <[email protected]> Reviewed-by: Matt Roper <[email protected]> Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-02drm/debugfs: drop unneeded DEBUG_FS guardDario Binacchi1-4/+0
The Makefile enables/disables the file compilation depending on CONFIG_DEBUG_FS. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-02drm/vkms: Avoid reading beyond LUT arrayHarry Wentland1-4/+10
When the floor LUT index (drm_fixp2int(lut_index) is the last index of the array the ceil LUT index will point to an entry beyond the array. Make sure we guard against it and use the value of the floor LUT index. v3: - Drop bits from commit description that didn't contribute anything of value Fixes: db1f254f2cfa ("drm/vkms: Add support to 1D gamma LUT") Signed-off-by: Harry Wentland <[email protected]> Cc: Arthur Grillo <[email protected]> Reviewed-by: Arthur Grillo <[email protected]> Reviewed-by: Melissa Wen <[email protected]> Signed-off-by: Melissa Wen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-02drm/vkms: Create separate Kconfig file for VKMSHarry Wentland2-13/+16
This aligns with most other DRM drivers and will allow us to add new VKMS config options without polluting the DRM Kconfig. v3: - Change SPDX to GPL-2.0-only to match DRM KConfig SPDX (Simon) Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Simon Ser <[email protected]> Signed-off-by: Melissa Wen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-02drm/vc4: plane: check drm_gem_plane_helper_prepare_fb() return valueSimon Ser1-1/+4
Bubble up any error to the caller. Signed-off-by: Simon Ser <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Kees Cook <[email protected]> Cc: Dave Stevenson <[email protected]> Reviewed-by: Maíra Canal <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-02drm/imagination: pvr_device.h: fix all kernel-doc warningsRandy Dunlap1-21/+25
Correct all kernel-doc notation on pvr_device.h so that there are no kernel-doc warnings remaining. pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' Signed-off-by: Randy Dunlap <[email protected]> Cc: Frank Binns <[email protected]> Cc: Donald Robson <[email protected]> Cc: Matt Coster <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: Jonathan Corbet <[email protected]> Cc: Vegard Nossum <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2024-01-01drm/ssd130x: Add support for the SSD133x OLED controller familyJavier Martinez Canillas3-1/+381
The Solomon SSD133x controllers (such as the SSD1331) are used by RGB dot matrix OLED panels, add a modesetting pipeline to support the chip family. The SSD133x controllers support 256 (8-bit) and 65k (16-bit) color depths but only the 256-color mode (DRM_FORMAT_RGB332) is implemented for now. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Split power mode settingAlex Bee2-35/+24
This splits setting the power mode of the controller / phy in two functions. It's done in preparation of setting up the phy based on the pixelclock. No functional changes intended. Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Don't power up the phy after resettingAlex Bee1-1/+1
inno_hdmi_reset is only ever called when initializing the controller. At this point it’s completely uneccessary to power up the PHY, since all what has to work at this point is the DDC bus. The phy will be powered up correctly when a mode is set in inno_hdmi_encoder_enable and disabled in inno_hdmi_encoder_disable. Set it to LOWER_PWR after resetting the controller. Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Correctly setup HDMI quantization rangeAlex Bee1-18/+42
The display controller will always give full range RGB regardless of the mode set, but HDMI requires certain modes to be transmitted in limited range RGB. This is especially required for HDMI sinks which do not support non-standard quantization ranges. This enables color space conversion for those modes and sets the quantization range accordingly in the AVI infoframe. Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Subclass connector stateAlex Bee1-27/+89
The data which is currently hold in hdmi_data should not be part of device itself but of the connector state. Introduce a connector state subclass and move the data from hdmi_data in there. Suggested-by: Maxime Ripard <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove useless includeAlex Bee1-1/+0
The inclusion syscon.h isn't used anywhere. Remove it. Signed-off-by: Alex Bee <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Drop irq struct memberAlex Bee1-1/+0
The struct member irq isn't used anywhere. Drop it. Signed-off-by: Alex Bee <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove unused drm device pointerMaxime Ripard1-2/+0
The drm_dev field in the inno_hdmi struct stores a pointer to the DRM device but is never used anywhere in the driver. Let's remove it. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Switch to infoframe typeMaxime Ripard1-10/+11
The inno_hdmi driver relies on its own internal infoframe type matching the hardware. This works fine, but in order to make further reworks easier, let's switch to the HDMI spec definition of those types. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Move infoframe disable to separate functionMaxime Ripard1-16/+30
The code to upload infoframes to the controller uses a weird construct which, based on the previous function call return code, will either disable or enable that infoframe. In order to get rid of that argument, let's split the function to disable the infoframe into a separate function and make it obvious what we are doing in the error path. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Drop HDMI Vendor Infoframe supportMaxime Ripard1-25/+10
The HDMI vendor infoframe is only meant to be sent with 4k60 modes and higher, but the controller doesn't support them. Let's drop them from the kernel. Suggested-by: Johan Jonker <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove tmds rate from structureMaxime Ripard1-9/+5
The tmds_rate field in the inno_hdmi structure is used mostly to configure the internal i2c controller divider through a call to the inno_hdmi_i2c_init() function. We can simply make that rate an argument to that function, which also removes a workaround to initialize the divider at probe time when we don't have a mode yet. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove YUV-based csc coefficentsAlex Bee1-37/+0
Now that the unneeded support for YUV based input formats is gone, the csc coefficients for those formats can be dropped as well. Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove useless input formatMaxime Ripard1-30/+11
The driver has a lot of logic to deal with multiple input formats, but hardcodes it to RGB. This means that most of that code has been dead code, so let's get rid of it. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> [made checkpatch happy] Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove unneeded has audio flagMaxime Ripard1-2/+0
The sink_has_audio flag is not used anywhere in the driver so let's get rid of it. It's redundant with drm_display_info.has_audio anyway. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: no need to store vicMaxime Ripard1-7/+5
The mode's VIC is only ever used in the inno_hdmi_setup() function so there's no need to store it in the main structure. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> [made checkpatch happy] Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Get rid of mode_setMaxime Ripard1-11/+11
We're not doing anything special in atomic_mode_set so we can simply merge it into atomic_enable. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Switch encoder hooks to atomicMaxime Ripard1-8/+11
The inno_hdmi encoder still uses the !atomic variants of enable, disable and modeset. Convert to their atomic equivalents. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove useless copy of drm_display_modeMaxime Ripard1-4/+0
The driver maintains a copy of the adjusted mode but doesn't use it anywhere. Remove it. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Remove useless mode_fixupMaxime Ripard1-8/+0
The mode_fixup implementation doesn't do anything, so we can simply remove it. Signed-off-by: Maxime Ripard <[email protected]> Tested-by: Alex Bee <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: inno_hdmi: Fix video timingAlex Bee1-2/+2
The controller wants the difference between *total and *sync_start in the HDMI_VIDEO_EXT_*DELAY registers. Otherwise the signal is very unstable for certain non-VIC modes. See downstream commit [0]. [0] https://github.com/rockchip-linux/kernel/commit/8eb559f2502c Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support") Co-developed-by: Zheng Yang <[email protected]> Signed-off-by: Zheng Yang <[email protected]> Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-12-30drm/rockchip: vop: Add output selection registers for RK312xAlex Bee2-1/+15
In contrast to RK3036, RK312x SoCs have multiple output channels such as RGB (i.e. LVDS TTL), LVDS, DSI and HDMI. In order to support that, this splits output from RK3036 and defines an separate one for RK3126 with the registers required to enable the appropriate output and setup the correct polarity. Signed-off-by: Alex Bee <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]