summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm: using mul_u32_u32() requires linux/math64.hStephen Rothwell2023-12-191-0/+1
| | | | | | | | | | | | | | | | Some pending include file cleanups produced this error: In file included from include/linux/kernel.h:27, from drivers/gpu/ipu-v3/ipu-dp.c:7: include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract': include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration] 45 | return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1), | ^~~~~~~~~~~ Fixes: c6fbb6bca108 ("drm: Fix color LUT rounding") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231219145734.13e40e1e@canb.auug.org.au
* drm/bridge: properly refcount DT nodes in aux bridge driversDmitry Baryshkov2023-12-192-3/+4
| | | | | | | | | | | | | | | | The aux-bridge and aux-hpd-bridge drivers didn't call of_node_get() on the device nodes further used for dev->of_node and platform data. When bridge devices are released, the reference counts are decreased, resulting in refcount underflow / use-after-free warnings. Get corresponding refcounts during AUX bridge allocation. Reported-by: Luca Weiss <luca.weiss@fairphone.com> Fixes: 2a04739139b2 ("drm/bridge: add transparent bridge helper") Fixes: 26f4bac3d884 ("drm/bridge: aux-hpd: Replace of_device.h with explicit include") Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231216235910.911958-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* drm/imagination: Fix error path in pvr_vm_create_contextDonald Robson2023-12-151-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | It is possible to double free the vm_ctx->mmu_ctx object in this function.     630 err_page_table_destroy: --> 631         pvr_mmu_context_destroy(vm_ctx->mmu_ctx); The pvr_vm_context_put() function does:         kref_put(&vm_ctx->ref_count, pvr_vm_context_release); Here the pvr_vm_context_release() will call:         pvr_mmu_context_destroy(vm_ctx->mmu_ctx); Refactor to an unwind style. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Donald Robson <donald.robson@imgtec.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-2-donald.robson@imgtec.com
* drm/imagination: Fix ERR_PTR test on pointer to pointer.Donald Robson2023-12-151-1/+1
| | | | | | | | | | | | | | | | drivers/gpu/drm/imagination/pvr_vm.c:631 pvr_vm_create_context() error: 'vm_ctx->mmu_ctx' dereferencing possible ERR_PTR() 612 vm_ctx->mmu_ctx = pvr_mmu_context_create(pvr_dev); 613 err = PTR_ERR_OR_ZERO(&vm_ctx->mmu_ctx); ^ The address is never an error pointer so this will always return 0. Remove the ampersand. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Donald Robson <donald.robson@imgtec.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-1-donald.robson@imgtec.com
* drm/imagination: Fixed oops when misusing ioctl CREATE_HWRT_DATASETDonald Robson2023-12-151-13/+14
| | | | | | | | | | | | | While writing the matching IGT suite I discovered that it's possible to cause a kernel oops when using DRM_IOCTL_PVR_CREATE_HWRT_DATASET when the call to hwrt_init_common_fw_structure() fails. Use an unwind-type error path to avoid cleaning up the object using the the release function before it is fully resolved. Signed-off-by: Donald Robson <donald.robson@imgtec.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208163019.95913-1-donald.robson@imgtec.com
* drm/imagination: Fixed infinite loop in pvr_vm_mips_map()Donald Robson2023-12-151-3/+3
| | | | | | | | | | | | | | | | | | | Unwinding loop in error path for this function uses unsigned limit variable, causing the promotion of the signed counter variable. --> 204 for (; pfn >= start_pfn; pfn--) ^^^^^^^^^^^^^^^^ If start_pfn can be zero then this is an endless loop. I've seen this code in other places as well. This loop is slightly off as well. It should decrement pfn on the first iteration. Fix by making the loop limit variables signed. Also fix missing predecrement by modifying to while loop. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Donald Robson <donald.robson@imgtec.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208160825.92933-1-donald.robson@imgtec.com
* drm: ci: Update xfailsVignesh Raman2023-12-133-3/+61
| | | | | | | | | Update msm-apq8016-fails, mediatek-mt8173-fails and virtio_gpu-none-fails to include the tests which fail. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-11-vignesh.raman@collabora.com
* drm/doc: ci: Add IGT version details for flaky testsVignesh Raman2023-12-131-3/+4
| | | | | | | | | Document the IGT version in the flaky tests reporting template. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-10-vignesh.raman@collabora.com
* drm: ci: uprev IGTVignesh Raman2023-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtio-gpu kernel driver reports 16 for count_crtcs which exceeds IGT_MAX_PIPES set to 8 in igt-gpu-tools. This results in below memory corruption,  malloc(): corrupted top size  Received signal SIGABRT.  Stack trace:   #0 [fatal_sig_handler+0x17b]   #1 [__sigaction+0x40]   #2 [pthread_key_delete+0x14c]   #3 [gsignal+0x12]   #4 [abort+0xd3]   #5 [__fsetlocking+0x290]   #6 [timer_settime+0x37a]   #7 [__default_morecore+0x1f1b]   #8 [__libc_calloc+0x161]   #9 [drmModeGetPlaneResources+0x44]   #10 [igt_display_require+0x194]   #11 [__igt_unique____real_main1356+0x93c]   #12 [main+0x3f]   #13 [__libc_init_first+0x8a]   #14 [__libc_start_main+0x85]   #15 [_start+0x21]   This is fixed in igt-gpu-tools by increasing IGT_MAX_PIPES to 16.   https://patchwork.freedesktop.org/series/126327/   Uprev IGT to include the patches which fixes this issue. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-9-vignesh.raman@collabora.com
* drm: ci: virtio: Make artifacts availableVignesh Raman2023-12-131-0/+2
| | | | | | | | | | There were no artifacts available for virtio job. So make the artifacts available in the pipeline job. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-8-vignesh.raman@collabora.com
* drm: ci: mt8173: Do not set IGT_FORCE_DRIVER to panfrostVignesh Raman2023-12-131-1/+8
| | | | | | | | | | | | | | | | | Mediatek 8173 and 8183 SOCs have a separate display controller and GPU with different drivers for each. For mt8173, the GPU driver is powervr and the display driver is mediatek. In the case of mt8183, the GPU driver is panfrost and the display driver is mediatek. Setting IGT_FORCE_DRIVER to panfrost for mt8173 is not the expected driver. So set mediatek for mt8173. Support to test both GPU and display drivers for these ARM SOCs will be added in the next patch series to increase test coverage. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-7-vignesh.raman@collabora.com
* drm: ci: Use scripts/config to enable/disable configsVignesh Raman2023-12-131-7/+7
| | | | | | | | | | | | Instead of modifying files in git to enable/disable configs, use scripts/config on the .config file which will be used for building the kernel. Acked-by: Helen Koike <helen.koike@collabora.com> Suggested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-6-vignesh.raman@collabora.com
* drm: ci: Enable new jobsVignesh Raman2023-12-131-9/+0
| | | | | | | | | | | | | | | | | | | | Enable the following jobs, as the issues noted in the TODO comments have been resolved. This will ensure that these jobs are now included and executed as part of the CI/CD pipeline. msm:apq8016: TODO: current issue: it is not fiding the NFS root. mediatek:mt8173: TODO: current issue: device is hanging. virtio_gpu:none: TODO: current issue: malloc(): corrupted top size. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-5-vignesh.raman@collabora.com
* drm: ci: arm64.config: Enable DA9211 regulatorVignesh Raman2023-12-131-0/+1
| | | | | | | | | | | Mediatek mt8173 board fails to boot with DA9211 regulator disabled. Enable CONFIG_REGULATOR_DA9211=y in arm64.config to fix mt8173 boot issue. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-4-vignesh.raman@collabora.com
* drm: ci: Force db410c to host modeVignesh Raman2023-12-132-2/+2
| | | | | | | | | | | | | | Force db410c to host mode to fix network issue which results in failure to mount root fs via NFS. See https://gitlab.freedesktop.org/gfx-ci/linux/-/commit/cb72a629 Use apq8016-sbc-usb-host.dtb which allows the USB controllers to work in host mode. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-3-vignesh.raman@collabora.com
* drm: ci: igt_runner: Remove todoVignesh Raman2023-12-131-1/+0
| | | | | | | | | | /sys/kernel/debug/dri/*/state exist for every atomic KMS driver. We do not test non-atomic drivers, so remove the todo. Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-2-vignesh.raman@collabora.com
* drm/imagination: vm: Fix heap lookup conditionAlex Bee2023-12-131-1/+1
| | | | | | | | | | | | | | | | When conditionally checking for heap existence of a certian address in pvr_vm_bind_op_map_init the condition whether the map request comes from a user is incorrect: The context must not be the kernel-context to be a user(space) context and should be looked up in pvr_heaps. That makes addresses coming from userspace not being verfied against the defined ranges and prevents firmware loading for meta cores. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Donald Robson <donald.robson@imgtec.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208170856.1748413-1-knaerzche@gmail.com
* drm/vc4: hdmi: Create destroy state implementationMaxime Ripard2023-12-131-1/+11
| | | | | | | | | | | | | | Even though we were rolling our own custom state for the vc4 HDMI controller driver, we were still using the generic helper to destroy that state. It was mostly working since the underlying state is the first member of our state so the pointers are probably equal in all relevant cases, but it's still fragile so let's fix this properly. Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231207-kms-hdmi-connector-state-v5-18-6538e19d634d@kernel.org
* drm/panel: ilitek-ili9805: adjust the includesDario Binacchi2023-12-131-2/+1
| | | | | | | | | Adjust the includes to explicitly include the correct headers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213112401.2000837-1-dario.binacchi@amarulasolutions.com
* drm/panel: synaptics-r63353: adjust the includesDario Binacchi2023-12-131-2/+1
| | | | | | | | | Adjust the includes to explicitly include the correct headers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213112432.2002832-1-dario.binacchi@amarulasolutions.com
* drm/uapi: drm_mode.h: fix spellos and grammarRandy Dunlap2023-12-131-9/+9
| | | | | | | | | | | | | | | Correct spellos reported by codespell. Fix some grammar (as 's' to a few words). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: David Airlie <airlied@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213044107.29214-1-rdunlap@infradead.org
* drm/drm_modeset_helper_vtables.h: fix typos/spellosRandy Dunlap2023-12-131-3/+3
| | | | | | | | | | | | | | Fix spelling problems as identified by codespell. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: David Airlie <airlied@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213043226.10046-1-rdunlap@infradead.org
* drm/fourcc: fix spelling/typosRandy Dunlap2023-12-131-5/+5
| | | | | | | | | | | | | | Correct spelling mistakes that were identified by codespell. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: David Airlie <airlied@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231213043925.13852-1-rdunlap@infradead.org
* MAINTAINERS: Add myself as a reviewer for rockchip drmAndy Yan2023-12-131-0/+1
| | | | | | | | | | | As I am familiar with all the details of vop2 display architecture, I can help review and test all related changes in this subsystem, so add my email here to make sure I get CC'd on rockchip drm changes. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211120023.1785687-1-andyshrk@163.com
* drm/rockchip: vop2: rename VOP_FEATURE_OUTPUT_10BIT to ↵Andy Yan2023-12-133-6/+6
| | | | | | | | | | | | | VOP2_VP_FEATURE_OUTPUT_10BIT VOP2 has multiple independent video ports with different feature, so rename VOP_FEATURE_OUTPUT_10BIT to VOP2_VP_FEATURE_OUTPUT_10BIT for more clearly meaning. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115931.1785495-1-andyshrk@163.com
* drm/rockchip: vop2: Add support for rk3588Andy Yan2023-12-133-6/+696
| | | | | | | | | | | | | | | | | | VOP2 on rk3588: Four video ports: VP0 Max 4096x2160 VP1 Max 4096x2160 VP2 Max 4096x2160 VP3 Max 2048x1080 4 4K Cluster windows with AFBC/line RGB and AFBC-only YUV support 4 4K Esmart windows with line RGB/YUV support Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115919.1785435-1-andyshrk@163.com
* dt-bindings: rockchip,vop2: Add more endpoint definitionAndy Yan2023-12-131-0/+4
| | | | | | | | | | There are 2 HDMI, 2 DP, 2 eDP on rk3588, so add corresponding endpoint definition for it. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115907.1785377-1-andyshrk@163.com
* dt-bindings: display: vop2: Add rk3588 supportAndy Yan2023-12-131-19/+81
| | | | | | | | | | | The vop2 on rk3588 is similar to which on rk356x but with 4 video ports and need to reference more grf modules. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115850.1785311-1-andyshrk@163.com
* drm/rockchip: vop2: rename grf to sys_grfAndy Yan2023-12-131-4/+4
| | | | | | | | | | | | The vop2 need to reference more grf(system grf, vop grf, vo0/1 grf,etc) in the upcoming rk3588. So we rename the current system grf to sys_grf. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115826.1785190-1-andyshrk@163.com
* drm/rockchip: vop2: set bg dly and prescan dly at vop2_post_configAndy Yan2023-12-131-16/+10
| | | | | | | | | | | | We need to setup background delay cycle and prescan delay cycle when a mode is enable to avoid trigger POST_BUF_EMPTY irq on rk3588. Note: RK356x has no such requirement. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115815.1785131-1-andyshrk@163.com
* drm/rockchip: vop2: Set YUV/RGB overlay modeAndy Yan2023-12-133-3/+16
| | | | | | | | | Set overlay mode register according to the output mode is yuv or rgb. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115805.1785073-1-andyshrk@163.com
* drm/rockchip: vop2: Add write mask for VP config doneAndy Yan2023-12-131-2/+13
| | | | | | | | | | | | | | | | The write mask bit is used to make sure when writing config done bit for one VP will not overwrite the other. Unfortunately, the write mask bit is missing on rk3566/8, that means when we write to these bits, it will not take any effect. We need this to make the vop work properly after rk3566/8 variants. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115752.1785013-1-andyshrk@163.com
* drm/rockchip: vop2: clear afbc en and transform bit for cluster window at ↵Andy Yan2023-12-131-0/+5
| | | | | | | | | | | | | | | | | linear mode The enable bit and transform offset of cluster windows should be cleared when it work at linear mode, or we may have a iommu fault issue on rk3588 which cluster windows switch between afbc and linear mode. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115741.1784954-1-andyshrk@163.com
* drm/rockchip: vop2: set half_block_en bit in all modeAndy Yan2023-12-131-7/+18
| | | | | | | | | | | | | | | At first we thought the half_block_en bit in AFBCD_CTRL register only work in afbc mode. But the fact is that it control the line buffer in all mode(afbc/tile/linear), so we need configure it in all case. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115730.1784893-1-andyshrk@163.com
* Revert "drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume"Andy Yan2023-12-131-3/+7
| | | | | | | | | | | | | | | | | | | | This reverts commit b63a553e8f5aa6574eeb535a551817a93c426d8c. regcache_sync will try to reload the configuration in regcache to hardware, but the registers of 4 Cluster windows and Esmart1/2/3 on the upcoming rk3588 can not be set successfully before internal PD power on. Also it's better to keep the hardware register as it is before we really enable it. So let's revert this version, and keep the first version: commit afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115719.1784834-1-andyshrk@163.com
* drm/rockchip: move output interface related definition to rockchip_drm_drv.hAndy Yan2023-12-1311-35/+18
| | | | | | | | | | | The output interface related definition can shared between vop and vop2, move them to rockchip_drm_drv.h can avoid duplicated definition. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115627.1784735-1-andyshrk@163.com
* drm/bridge: ti-sn65dsi86: Associate PWM device to auxiliary deviceUwe Kleine-König2023-12-111-7/+9
| | | | | | | | | | | | | | | | | | | It's the ti_sn65dsi86.pwm auxiliary driver that creates the pwmchip, so let the auxiliary device be the parent of the pwm device. Note that getting a reference to the ti-sn65dsi86's pwm using pwm_get() isn't affected by this change as ti_sn65dsi86_add_aux_device() sets the auxiliary device's of_node to that of the main device. Also change PM runtime tracking and diagnostic messages to use that one. After enabling runtime PM operation for the auxiliary device, all works as expected as parent devices are handled just fine. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: Nikita Travkin <nikita@trvn.ru> # Acer Aspire 1 Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231209153108.1988551-2-u.kleine-koenig@pengutronix.de
* drm/panel: simple: Add AUO G156HAN04.0 LVDS display supportElmar Albert2023-12-111-0/+34
| | | | | | | | | | | | | | | | | | G156HAN04.0 is a Color Active Matrix Liquid Crystal Display composed of a TFT LCD panel, a driver circuit, and LED backlight system. The screen format is intended to support the 16:9 FHD, 1920(H) x 1080(V) screen and 16.7M colors (RGB 8-bits) with LED backlight driving circuit. All input signals are LVDS interface compatible. G156HAN04.0 is designed for a display unit of notebook style personal computer and industrial machine. Signed-off-by: Elmar Albert <ealbert@data-modul.com> Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20231209063714.1381913-2-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231209063714.1381913-2-marex@denx.de
* dt-bindings: display: simple: Add AUO G156HAN04.0 LVDS displayElmar Albert2023-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | Document support for the AUO G156HAN04.0 LVDS display. G156HAN04.0 is a Color Active Matrix Liquid Crystal Display composed of a TFT LCD panel, a driver circuit, and LED backlight system. The screen format is intended to support the 16:9 FHD, 1920(H) x 1080(V) screen and 16.7M colors (RGB 8-bits) with LED backlight driving circuit. All input signals are LVDS interface compatible. G156HAN04.0 is designed for a display unit of notebook style personal computer and industrial machine. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Elmar Albert <ealbert@data-modul.com> Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20231209063714.1381913-1-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231209063714.1381913-1-marex@denx.de
* drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panelMichael Trimarchi2023-12-111-0/+53
| | | | | | | | | | | | | | Tianma TM041XDHG01 utilizes the Ilitek ILI9805 controller. Add this panel's initialzation sequence and timing to ILI9805 driver. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/r/20231207141723.108004-10-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-10-dario.binacchi@amarulasolutions.com
* drm/panel: Add Ilitek ILI9805 panel driverMichael Trimarchi2023-12-114-0/+369
| | | | | | | | | | | | The GPM1790A0 panel is based on the Ilitek ILI9805 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231207141723.108004-9-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-9-dario.binacchi@amarulasolutions.com
* dt-bindings: display: panel: Add Ilitek ili9805 panel controllerMichael Trimarchi2023-12-111-0/+62
| | | | | | | | | | | Add documentation for "ilitek,ili9805" panel. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231207141723.108004-8-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-8-dario.binacchi@amarulasolutions.com
* drm/panel: Add Synaptics R63353 panel driverMichael Trimarchi2023-12-114-0/+379
| | | | | | | | | | | | The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231207141723.108004-7-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-7-dario.binacchi@amarulasolutions.com
* drm/panel: st7701: Add Anbernic RG-ARC Panel SupportChris Morgan2023-12-111-0/+136
| | | | | | | | | | | The Powkiddy RG-ARC is a series of 2 handheld devices, each with a 4 inch 480x640 display. Add support for the display. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231208154847.130615-4-macroalpha82@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-4-macroalpha82@gmail.com
* dt-bindings: display: st7701: Add Anbernic RG-ARC panelChris Morgan2023-12-111-0/+1
| | | | | | | | | | | | The RG-ARC panel is a panel specific to the Anbernic RG-ARC. It is 4 inches in size (diagonally) with a resolution of 480x640. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231208154847.130615-3-macroalpha82@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-3-macroalpha82@gmail.com
* drm/panel: st7701: Fix AVCL calculationChris Morgan2023-12-111-1/+1
| | | | | | | | | | | | | | | | | | | The AVCL register, according to the datasheet, comes in increments of -0.2v between -4.4v (represented by 0x0) to -5.0v (represented by 0x3). The current calculation is done by adding the defined AVCL value in mV to -4400 and then dividing by 200 to get the register value. Unfortunately if I subtract -4400 from -4400 I get -8800, which divided by 200 gives me -44. If I instead subtract -4400 from -4400 I get 0, which divided by 200 gives me 0. Based on the datasheet this is the expected register value. Fixes: 83b7a8e7e88e ("drm/panel/panel-sitronix-st7701: Parametrize voltage and timing") Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231208154847.130615-2-macroalpha82@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-2-macroalpha82@gmail.com
* dt-bindings: display: panel: add Fascontek FS035VG158 panelJohn Watts2023-12-111-0/+56
| | | | | | | | | | This is a small 3.5" 640x480 IPS LCD panel. Signed-off-by: John Watts <contact@jookia.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-7-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-7-d75adc75571f@jookia.org
* dt-bindings: vendor-prefixes: Add fascontekJohn Watts2023-12-111-0/+2
| | | | | | | | | | Fascontek manufactures LCD panels such as the FS035VG158. Signed-off-by: John Watts <contact@jookia.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-6-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-6-d75adc75571f@jookia.org
* dt-bindings: display: panel: Clean up leadtek,ltk035c5444t propertiesJohn Watts2023-12-111-6/+2
| | | | | | | | | | | Remove common properties listed in common yaml files. Add required properties needed to describe the panel. Signed-off-by: John Watts <contact@jookia.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-5-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-5-d75adc75571f@jookia.org
* drm/panel: nv3052c: Add Fascontek FS035VG158 LCD displayJohn Watts2023-12-111-0/+223
| | | | | | | | | | | | This display is extremely similar to the LTK035C5444T, but still has some minor variations in panel initialization. Signed-off-by: John Watts <contact@jookia.org> Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-4-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-4-d75adc75571f@jookia.org