summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2023-03-14drm/sti: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-15-tzimmermann@suse.de
2023-03-14drm/mxsfb: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-14-tzimmermann@suse.de
2023-03-14drm/mxsfb/lcdif: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-13-tzimmermann@suse.de
2023-03-14drm/meson: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-12-tzimmermann@suse.de
2023-03-14drm/logicvc: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-11-tzimmermann@suse.de
2023-03-14drm/kmb: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-10-tzimmermann@suse.de
2023-03-14drm/imx: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-9-tzimmermann@suse.de
2023-03-14drm/imx/dcss: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-8-tzimmermann@suse.de
2023-03-14drm/fsl-dcu: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-7-tzimmermann@suse.de
2023-03-14drm/atmel-hlcdc: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-6-tzimmermann@suse.de
2023-03-14drm/aspeed: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-5-tzimmermann@suse.de
2023-03-14arm/malidp: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-4-tzimmermann@suse.de
2023-03-14arm/hdlcd: Use GEM DMA fbdev emulationThomas Zimmermann1-2/+2
Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-3-tzimmermann@suse.de
2023-03-14drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpersThomas Zimmermann2-0/+276
Implement fbdev emulation that is optimized for drivers that use DMA helpers. The buffers may no tbe moveable, may not require damage handling and have to be located in system memory. This allows fbdev emulation to operate directly on the buffer and mmap it to userspace. Besides those constraints, the emulation works like in the generic code. As an internal DRM client provides, it receives hotplug, restore and unregister events. The DRM client is independent from the fbdev probing, which runs on the first successful hotplug event. The emulation is part of the DMA helper module and not build unless DMA helpers and fbdev emulation has been configured. Tested with vc4. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-2-tzimmermann@suse.de
2023-03-14drm: Drop ARCH_MULTIPLATFORM from dependenciesUwe Kleine-König5-5/+5
Some of these dependencies used to be sensible when only a small part of the platforms supported by ARCH=arm could be compiled together in a single kernel image. Nowadays ARCH_MULTIPLATFORM is only used as a guard for kernel options incompatible with a multiplatform image. See commit 84fc86360623 ("ARM: make ARCH_MULTIPLATFORM user-visible") for some more details. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221209220555.3631364-1-u.kleine-koenig@pengutronix.de
2023-03-14drm/imx/lcdc: Implement DRM driver for imx25Marian Cichy5-0/+555
Add support for the LCD Controller found on i.MX21 and i.MX25. It targets to be a drop in replacement for the imx-fb driver. [ukl: Rebase to a newer kernel version, various smaller fixes and improvements] Signed-off-by: Marian Cichy <m.cichy@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230306115249.2223042-3-u.kleine-koenig@pengutronix.de
2023-03-13drm/virtio: Enable fb damage clips property for the primary planeJavier Martinez Canillas1-0/+4
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane. Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips. Reported-by: Christian Hergert <chergert@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230310125943.912514-1-javierm@redhat.com
2023-03-13drm/panel: Add driver for Novatek NT36523Jianhua Lu3-0/+788
Add a driver for panels using the Novatek NT36523 display driver IC. Signed-off-by: Jianhua Lu <lujianhua000@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230313101858.14611-2-lujianhua000@gmail.com
2023-03-13drm/cirrus: Use VGA macro constants to unblankThomas Zimmermann1-1/+1
Set the VGA bit for unblanking with macro constants instead of magic values. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-18-tzimmermann@suse.de
2023-03-13drm/cirrus: Store HW format/pitch in primary-plane stateThomas Zimmermann1-20/+31
The hardware settings for color format and pitch are state of the primary plane. Store the values in the primary plane's state structure struct cirrus_primary_plane_state. Adapt all callers. All fields in struct cirrus_device are now considered immutable after initialization. Plane updates consider the difference between the old and the new plane state before updating format or pitch. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-17-tzimmermann@suse.de
2023-03-13drm/cirrus: Introduce struct cirrus_primary_plane_stateThomas Zimmermann1-1/+58
The cirrus driver maintains plane state, format and pitch, in it's device structure. Introduce a plane state for the primary plane to store the values. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-16-tzimmermann@suse.de
2023-03-13drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_checkThomas Zimmermann1-16/+10
Inline the framebuffer size check into the primary plane's atomic_check cirrus_primary_plane_atomic_check(). No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-15-tzimmermann@suse.de
2023-03-13drm/cirrus: Test mode against video-memory size in device-wide mode_validThomas Zimmermann1-10/+13
Test a display mode against the available amount of video memory in struct drm_mode_config_funcs.mode_valid, which cirrus implements in cirrus_mode_config_mode_valid(). This helper tests display modes against device-wide limits. Remove the now-obsolete per-CRTC test. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-14-tzimmermann@suse.de
2023-03-13drm/cirrus: Remove size test from cirrus_fb_create()Thomas Zimmermann1-10/+1
The DRM core implements a size check against the mode config's limits when creating a framebuffer. [1] Remove the unnecessary test from cirrus_fb_create() and remove the now-empty function. Create framebuffers with drm_gem_fb_create_with_dirty(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_framebuffer.c#L287 # [1] Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-13-tzimmermann@suse.de
2023-03-13drm/cirrus: Remove format test from cirrus_fb_create()Thomas Zimmermann1-4/+0
The DRM core implements a format check when setting a framebuffer for a plane. [1] Remove the unnecessary test from cirrus_fb_create(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_atomic.c#L629 # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-12-tzimmermann@suse.de
2023-03-13drm/cirrus: Inline cirrus_fb_blit_rect()Thomas Zimmermann1-16/+6
Inline cirrus_fb_blit_rect into its only caller. While at it, update the code to use IOSYS_MAP_INIT_OFFSET(), which is the ideomatic way of initializing struct iosys_map with an offset. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-11-tzimmermann@suse.de
2023-03-13drm/cirrus: Enable damage clipping on primary planeThomas Zimmermann1-3/+7
Enable damage clipping on the primary plane and iterate over small areas of reported framebuffer damage. Avoid the overhead of permanent full-screen updates that cirrus currently implements. This problem is indicated by the warning drm_plane_enable_fb_damage_clips() not called in the kernel's log. Without damage clipping, drivers do full updates of the screen area. This is costly as many screen updates, such as cursor movement or command-line input, only change a small portion of the output. Damage clipping allows renderers to inform drivers about the changed areas. With the damage information known, cirrus now iterates over a list of change areas and only flushes those to the hardware's scanout buffer. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-10-tzimmermann@suse.de
2023-03-13drm/cirrus: Convert to regular atomic helpersThomas Zimmermann1-64/+138
Replace simple-KMS helpers with DRM's regular helpers for atomic modesetting. Avoids the mid-layer and the additional wrappers around GEM's shadow-plane helpers. Most of the simple-KMS code is just wrappers around regular atomic helpers. The conversion is therefore equivalent to pulling the simple-KMS helpers into cirrus and removing all the intermediate code and data structures between the driver and the atomic helpers. As the simple-KMS helpers lump primary plan, CRTC and encoder into a single data structure, the conversion to regular helpers allows to split modesetting from plane updates and handle each individually. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-9-tzimmermann@suse.de
2023-03-13drm/cirrus: Move primary-plane format arraysThomas Zimmermann1-14/+14
Move the primary plane's format and modifier arrays within the source file and adapt naming slightly. No functional changes. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-8-tzimmermann@suse.de
2023-03-13drm/cirrus: Integrate connector into pipeline codeThomas Zimmermann1-42/+38
Integrate the connector with the rest of the pipeline setup code. Move some helpers within the file and adapt naming slightly. No functional changes. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-7-tzimmermann@suse.de
2023-03-13drm/cirrus: Split cirrus_mode_set() into smaller functionsThomas Zimmermann1-25/+38
Split cirrus_mode_set() into smaller functions that set the display mode, color format and scnaline pitch individually. Better reflects the design of the DRM modesetting pipeline. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-6-tzimmermann@suse.de
2023-03-13drm/cirrus: Move drm_dev_{enter, exit}() into DRM helpersThomas Zimmermann1-18/+13
Call drm_dev_enter() and drm_dev_exit() immediately after entering cirrus' DRM helper functions. Remove these calls from other functions. Each enter/exit block in the DRM helpers covers the full hardware update. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-5-tzimmermann@suse.de
2023-03-13drm/cirrus: Use drm_fb_blit() to update scanout bufferThomas Zimmermann1-14/+1
Cirrus' blit helper reimplements code from the shared blit helper drm_fb_blit(). Use the helper instead. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-4-tzimmermann@suse.de
2023-03-13drm/cirrus: Replace cpp value with formatThomas Zimmermann1-24/+26
Using components per pixel to describe a color format is obsolete. Use the format info and 4CC value instead. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-3-tzimmermann@suse.de
2023-03-13drm/cirrus: Compute blit destination offset in single locationThomas Zimmermann1-3/+1
The calculation for the scanout-buffer blit offset is independent from the color format. In the one case where the current code uses fb->pitches[0] instead of cirrus->pitch, their values are identical. Hence merge all into a single line. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-2-tzimmermann@suse.de
2023-03-13Merge drm/drm-next into drm-misc-nextThomas Zimmermann389-7080/+11583
Backmerging to get v6.3-rc1 and sync with the other DRM trees. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2023-03-10drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmtsJavier Martinez Canillas1-2/+5
There are DRM fourcc formats that have pixels smaller than a byte, but the conversion_buf_size() function assumes that pixels are a multiple of bytes and use the struct drm_format_info .cpp field to calculate the dst_pitch. Instead, calculate it by using the bits per pixel (bpp) and divide it by 8 to account for formats that have sub-byte pixels. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230307215039.346863-1-javierm@redhat.com
2023-03-09drm/tests: helpers: Drop empty platform remove functionUwe Kleine-König1-6/+0
A remove callback just returning 0 is equivalent to no remove callback at all. So drop the useless function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20230224221417.1712368-1-u.kleine-koenig@pengutronix.de
2023-03-09drm/ttm: Don't print error message if eviction was interruptedThomas Hellström1-1/+2
Avoid printing an error message if eviction was interrupted by, for example, the user pressing CTRL-C. That may happen if eviction is waiting for something, like for example a free batch-buffer. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-6-thomas.hellstrom@linux.intel.com
2023-03-09drm/ttm: Unexport ttm_global_swapout()Thomas Hellström1-1/+0
Unexport ttm_global_swapout() since it is not used outside of TTM. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-5-thomas.hellstrom@linux.intel.com
2023-03-09drm/rockchip: vop2: add polarity flags to RGB outputGerald Loacker1-0/+2
Use h/v-sync and pixel clock polarity flags for RGB output. For all other outputs this is already implemented. Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230302123949.957998-1-gerald.loacker@wolfvision.net
2023-03-09drm/rockchip: vop2: use struct_size() in vop2_bindJacob Keller1-1/+1
Use the overflow-protected struct_size() helper macro to compute the allocation size of the vop2 data structure. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Sandy Huang <hjc@rock-chips.com> Cc: Heiko Stübner <heiko@sntech.de> Cc: David Airlie <airlied@gmail.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230223013533.1707706-1-jacob.e.keller@intel.com
2023-03-09drm/rockchip: dw_hdmi: discard modes with unachievable pixelclocksSascha Hauer1-0/+7
The Rockchip PLL drivers are currently table based and support only the most common pixelclocks. Discard all modes we cannot achieve at all. Normally the desired pixelclocks have an exact match in the PLL driver, nevertheless allow for a 0.1% error just in case. Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Tested-by: Michael Riesch <michael.riesch@wolfvision.net> Tested-by: Dan Johansen <strit@manjaro.org> Link: https://lore.kernel.org/r/20230118132213.2911418-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-5-s.hauer@pengutronix.de
2023-03-09drm/rockchip: dw_hdmi: Add support for 4k@30 resolutionSascha Hauer1-0/+8
This adds the PLL/phy settings to support higher resolutions like 4k@30. The values were taken from the Rockchip downstream Kernel. Tested-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.kernel.org/r/20220926080435.259617-3-s.hauer@pengutronix.de Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Tested-by: Dan Johansen <strit@manjaro.org> Link: https://lore.kernel.org/r/20230118132213.2911418-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-4-s.hauer@pengutronix.de
2023-03-09drm/rockchip: dw_hdmi: relax mode_valid hookSascha Hauer1-7/+19
The driver checks if the pixel clock of the given mode matches an entry in the mpll config table. At least for the Synopsys phy the frequencies in the mpll table are meant as a frequency range up to which the entry works, not as a frequency that must match the pixel clock. Return MODE_OK when the pixelclock is smaller than one of the mpll frequencies to allow for more display resolutions. Limit this behaviour to the Synopsys phy at the moment and keep the current behaviour of forcing exact pixelclock rates for the other phys until it has been sorted out how and if the vendor specific phys work with non standard clock rates. Tested-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.kernel.org/r/20220926080435.259617-2-s.hauer@pengutronix.de Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Tested-by: Dan Johansen <strit@manjaro.org> Link: https://lore.kernel.org/r/20230118132213.2911418-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-3-s.hauer@pengutronix.de
2023-03-09drm/rockchip: vop: limit maximum resolution to hardware capabilitiesSascha Hauer4-5/+36
The different VOP variants support different maximum resolutions. Reject resolutions that are not supported by a specific variant. This hasn't been a problem in the upstream driver so far as 1920x1080 has been the maximum resolution supported by the HDMI driver and that resolution is supported by all VOP variants. Now with higher resolutions supported in the HDMI driver we have to limit the resolutions to the ones supported by the VOP. The actual maximum resolutions are taken from the Rockchip downstream Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [dropped the vdisplay > height check after talking to Sascha, as according to the vendor code "Actually vop hardware has no output height limit" (from vendor commit "drm/rockchip: vop: get rid of max_output.height check") and the height-check broke the px30-minievb display] Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-2-s.hauer@pengutronix.de
2023-03-08gpu/drm/panel: Add Sony TD4353 JDI panel driverKonrad Dybcio3-0/+340
Add support for the Sony TD4353 JDI 2160x1080 display panel used in some Sony Xperia XZ2 and XZ2 Compact smartphones. Due to the specifics of smartphone manufacturing, it is impossible to retrieve a better name for this panel. This revision adds support for the default 60 Hz configuration, however there could possibly be some room for expansion, as the display panels used on Sony devices have historically been capable of >2x refresh rate overclocking. Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230119163201.580858-2-konrad.dybcio@linaro.org
2023-03-08drm: panel: Add orientation support for st7701Maya Matuszczyk1-0/+19
Note that this patch is 'heavily inspired' by orientation support in driver for Elida KD35T133 panel Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-4-maccraft123mc@gmail.com
2023-03-08drm: panel: Add Elida KD50T048A to Sitronix ST7701 driverMaya Matuszczyk1-0/+125
Add KD50T048A MIPI-DSI panel, which is based on ST7701 chip. Not sure what else to add to this commit message. Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-3-maccraft123mc@gmail.com
2023-03-07drm/rockchip: dsi: Remove the unused function dsi_read()Jiapeng Chong1-5/+0
The function dsi_read is defined in the dw-mipi-dsi-rockchip.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:362:19: warning: unused function 'dsi_read'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3984 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230208023429.73696-1-jiapeng.chong@linux.alibaba.com