Anshuman Gupta
7d23a80dc9
drm/i915/dgfx: Disable d3cold at gfx root port
...
Currently i915 disables d3cold for i915 pci dev.
This blocks D3 for i915 gfx pci upstream bridge (VSP).
Let's disable d3cold at gfx root port to make sure that
i915 gfx VSP can transition to D3 to save some power.
We don't need to disable/enable d3cold in rpm, s2idle
suspend/resume handlers. Disabling/Enabling d3cold at
gfx root port in probe/remove phase is sufficient.
Fixes: 1a085e2341 ("drm/i915: Disable D3Cold in s2idle and runtime pm")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com >
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616122249.5007-1-anshuman.gupta@intel.com
(cherry picked from commit 138c2fca6f )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2022-06-27 18:12:05 +03:00
katrinzhou
9efdd519d0
drm/i915/gem: add missing else
...
Add missing else in set_proto_ctx_param() to fix coverity issue.
Addresses-Coverity: ("Unused value")
Fixes: d4433c7600 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)")
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: katrinzhou <katrinzhou@tencent.com >
[tursulin: fixup alignment]
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220621124926.615884-1-tvrtko.ursulin@linux.intel.com
(cherry picked from commit 7482a65664 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2022-06-27 18:12:03 +03:00
Matt Roper
7d8097073c
drm/i915: Prefer "XEHP_" prefix for registers
...
We've been introducing new registers with a mix of "XEHP_"
(architecture) and "XEHPSDV_" (platform) prefixes. For consistency,
let's settle on "XEHP_" as the preferred form.
XEHPSDV_RP_STATE_CAP stays with its current name since that's truly a
platform-specific register and not something that applies to the Xe_HP
architecture as a whole.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Caz Yokoyama <caz@caztech.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220624210328.308630-2-matthew.d.roper@intel.com
2022-06-27 07:44:25 -07:00
Matt Roper
8524bb6714
drm/i915: Correct duplicated/misplaced GT register definitions
...
XEHPSDV_FLAT_CCS_BASE_ADDR, GEN8_L3_LRA_1_GPGPU, and MMCD_MISC_CTRL were
duplicated between i915_reg.h and intel_gt_regs.h. These are all GT
registers, so we should drop the copy from i915_reg.h.
XEHPSDV_TILE0_ADDR_RANGE was defined in i915_reg.h, but really belongs
in intel_gt_regs.h. Move it.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220624210328.308630-1-matthew.d.roper@intel.com
2022-06-27 07:44:17 -07:00
Nancy.Lin
5621416b11
drm/mediatek: Add mediatek-drm plane color encoding info
...
Add plane color encoding information for color space conversion.
It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma
csc control.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-10-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:42:20 +08:00
Nancy.Lin
aaf94f7c3a
drm/mediatek: Add display merge async reset control
...
Add merge async reset control in mtk_merge_stop. Async hw doesn't do self
reset on each sof signal(start of frame), so need to reset the async to
clear the hw status for the next merge start.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-8-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:39:37 +08:00
Nancy.Lin
a5b51d1dd9
drm/mediatek: Add display merge mute/unmute support for MT8195
...
Add merge mute/unmute setting for MT8195.
MT8195 Vdosys1 merge1~merge4 support HW mute function.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-7-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:35:21 +08:00
Nancy.Lin
d2ae586f0e
drm/mediatek: Add display merge start/stop API for cmdq support
...
Add merge start/stop API for cmdq support. The ovl_adaptor merges
are configured with each drm plane update. Need to enable/disable
merge with cmdq making sure all the settings taken effect in the
same vblank.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-6-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:32:28 +08:00
Nancy.Lin
7e4727f745
drm/mediatek: Add display merge advance config API for MT8195
...
Add merge new advance config API. The original merge API is
mtk_ddp_comp_funcs function prototype. The API interface parameters
cannot be modified, so add a new config API for extension. This is
the preparation for ovl_adaptor merge control.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-5-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:29:17 +08:00
Nancy.Lin
f8946e2b6b
drm/mediatek: Add display MDP RDMA support for MT8195
...
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of
the ovl_adaptor component.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-4-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-06-27 22:24:14 +08:00
Yannick Fertre
7d008eecb0
drm/stm: ltdc: update hardware error management
...
The latest hardware version (0x40100) supports a hardware threshold
register (aka FUTR) to trigger a fifo underrun interrupt.
A software threshold has been implemented for other hardware versions.
The threshold is set to 128 by default.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134654.594373-1-yannick.fertre@foss.st.com
2022-06-27 16:01:50 +02:00
Yannick Fertre
c6193dc57f
drm/stm: ltdc: add support of horizontal & vertical mirroring
...
Support of vertical & horizontal mirroring features thanks to
the plane rotation property.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134547.593790-1-yannick.fertre@foss.st.com
2022-06-27 16:01:40 +02:00
Yannick Fertre
62467fccb7
drm/stm: ltdc: add support of the dynamic z-order
...
Zpos property is immutable for all hardware versions except the last
version (0x40100) which support the blending order feature
(dynamic z-order).
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134459.593379-1-yannick.fertre@foss.st.com
2022-06-27 16:01:17 +02:00
Yannick Fertre
44b4e72822
drm/stm: ltdc: fix various coding-style warnings
...
Fix issues reported by checkpatch.pl:
- Braces {} should be used on all arms
- Blank lines
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134334.592805-1-yannick.fertre@foss.st.com
2022-06-27 15:53:49 +02:00
Yannick Fertre
fb37cfa032
drm/stm: ltdc: remove error message about scaling
...
Remove error message about scaling & replace it by a debug
message to avoid too much error.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134250.592408-1-yannick.fertre@foss.st.com
2022-06-27 15:53:49 +02:00
Yannick Fertre
c4f218d46f
drm/stm: ltdc: disable all layers before crtc shutdown
...
All plans must be disabled before the CRTC shutdown helping
the crtc to restart from a clean situation (without unwanted
planes already enable).
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com >
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134151.591997-1-yannick.fertre@foss.st.com
2022-06-27 15:53:49 +02:00
Maxime Ripard
5f701324c0
drm/vc4: perfmon: Fix variable dereferenced before check
...
Commit 30f8c74ca9 ("drm/vc4: Warn if some v3d code is run on BCM2711")
introduced a check in vc4_perfmon_get() that dereferences a pointer before
we checked whether that pointer is valid or not.
Let's rework that function a bit to do things in the proper order.
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Fixes: 30f8c74ca9 ("drm/vc4: Warn if some v3d code is run on BCM2711")
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: José Expósito <jose.exposito89@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220622080243.22119-1-maxime@cerno.tech
2022-06-27 15:43:14 +02:00
Matthew Auld
563aaf4a92
drm/i915: tweak the ordering in cpu_write_needs_clflush
...
For imported dma-buf objects we leave the object as cache_coherent = 0
across all platforms, which is reasonable given that have no clue what
the memory underneath is, and its not like the driver can ever manually
clflush the pages anyway (like with i915_gem_clflush_object) for such
objects. However on discrete we choose to treat cache_dirty = true as a
programmer error, leading to a warning. The simplest fix looks to be to
just change the ordering in cpu_write_needs_clflush to prevent ever
setting cache_dirty for dma-buf objects on discrete.
Fixes: d028a7690d ("drm/i915/dmabuf: Fix prime_mmap to work when using LMEM")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5266
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220622155919.355081-1-matthew.auld@intel.com
2022-06-27 12:56:52 +01:00
José Expósito
8f45610491
drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()
...
Test the conversion from XRGB8888 to RGB332.
What is tested?
- Different values for the X in XRGB8888 to make sure it is ignored
- Different clip values: Single pixel and full and partial buffer
- Well known colors: White, black, red, green, blue, magenta, yellow
and cyan
- Other colors: Randomly picked
- Destination pitch
How to run the tests?
$ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests \
--kconfig_add CONFIG_VIRTIO_UML=y \
--kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y
Suggested-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: David Gow <davidgow@google.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: José Expósito <jose.exposito89@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220620160640.3790-3-jose.exposito89@gmail.com
2022-06-27 13:45:53 +02:00
Anshuman Gupta
138c2fca6f
drm/i915/dgfx: Disable d3cold at gfx root port
...
Currently i915 disables d3cold for i915 pci dev.
This blocks D3 for i915 gfx pci upstream bridge (VSP).
Let's disable d3cold at gfx root port to make sure that
i915 gfx VSP can transition to D3 to save some power.
We don't need to disable/enable d3cold in rpm, s2idle
suspend/resume handlers. Disabling/Enabling d3cold at
gfx root port in probe/remove phase is sufficient.
Fixes: 1a085e2341 ("drm/i915: Disable D3Cold in s2idle and runtime pm")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com >
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com >
Acked-by:: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616122249.5007-1-anshuman.gupta@intel.com
2022-06-27 17:06:03 +05:30
Thomas Zimmermann
016a14beac
drm/ast: Enable primary plane with CRTC
...
As the CRTC requires a primary plane for display, ensure that the
primary plane is enabled with the CRTC.
Use drm_atomic_helper_check_crtc_state(). Add all affected planes
to the atomic state so that their state will be checked as well.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-4-tzimmermann@suse.de
2022-06-27 11:10:43 +02:00
Thomas Zimmermann
dc2cdd17d1
drm/simple-kms: Use drm_atomic_helper_check_crtc_state()
...
Simple-KMS helpers guarantee that the CRTC and plane enable
flags are synchronized. Implement this with atomic helpers
drm_atomic_helper_check_crtc_state() on the CRTC side, and
drm_atomic_helper_check_plane_state() on the plane side.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-3-tzimmermann@suse.de
2022-06-27 11:10:43 +02:00
Thomas Zimmermann
d6b9af1097
drm/atomic-helper: Add helper drm_atomic_helper_check_crtc_state()
...
Add drm_atomic_helper_check_crtc_state(), which contains tests common
to many CRTCs. The first added test verifies that an enabled CRTC has
at least one enabled primary plane.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-2-tzimmermann@suse.de
2022-06-27 11:10:43 +02:00
Thomas Zimmermann
ae25885bdf
drm/fb-helper: Fix out-of-bounds access
...
Clip memory range to screen-buffer size to avoid out-of-bounds access
in fbdev deferred I/O's damage handling.
Fbdev's deferred I/O can only track pages. From the range of pages, the
damage handler computes the clipping rectangle for the display update.
If the fbdev screen buffer ends near the beginning of a page, that page
could contain more scanlines. The damage handler would then track these
non-existing scanlines as dirty and provoke an out-of-bounds access
during the screen update. Hence, clip the maximum memory range to the
size of the screen buffer.
While at it, rename the variables min/max to min_off/max_off in
drm_fb_helper_deferred_io(). This avoids confusion with the macros of
the same name.
Reported-by: Nuno Gonçalves <nunojpg@gmail.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Tested-by: Nuno Gonçalves <nunojpg@gmail.com >
Fixes: 67b723f5b7 ("drm/fb-helper: Calculate damaged area in separate helper")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Javier Martinez Canillas <javierm@redhat.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: <stable@vger.kernel.org > # v5.18+
Link: https://patchwork.freedesktop.org/patch/msgid/20220621104617.8817-1-tzimmermann@suse.de
2022-06-27 11:10:43 +02:00
Thomas Zimmermann
7283f862bd
drm: Implement DRM aperture helpers under video/
...
Implement DRM's aperture helpers under video/ for sharing with other
sub-systems. Remove DRM-isms from the interface. The helpers track
the ownership of framebuffer apertures and provide hand-over from
firmware, such as EFI and VESA, to native graphics drivers.
Other subsystems, such as fbdev and vfio, also have to maintain ownership
of framebuffer apertures. Moving DRM's aperture helpers to a more public
location allows all subsystems to interact with each other and share a
common implementation.
The aperture helpers are selected by the various firmware drivers within
DRM and fbdev, and the VGA text-console driver.
The original DRM interface is kept in place for use by DRM drivers.
v3:
* prefix all interfaces with aperture_ (Javier)
* rework and simplify documentation (Javier)
* rename struct dev_aperture to struct aperture_range
* rebase onto latest DRM
* update MAINTAINERS entry
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220622140134.12763-3-tzimmermann@suse.de
2022-06-27 11:07:55 +02:00
Jocelyn Falempe
5171660cbb
drm/ast: Fix black screen when getting out of suspend
...
With an AST2600, the screen is garbage when going out of suspend.
This is because color settings are lost, and not restored on resume.
Force the color settings on DPMS_ON, to make sure the settings are correct.
I didn't write this code, it comes from the out-of-tree aspeed driver v1.13
https://www.aspeedtech.com/support_driver/
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Tested-by: Venkat Tadikonda <venkateswara.rao@intel.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Tested-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20220622124815.356035-1-jfalempe@redhat.com
2022-06-27 10:15:02 +02:00
Miaoqian Lin
3a149169e4
drm/mcde: Fix refcount leak in mcde_dsi_bind
...
Every iteration of for_each_available_child_of_node() decrements
the reference counter of the previous node. There is no decrement
when break out from the loop and results in refcount leak.
Add missing of_node_put() to fix this.
Fixes: 5fc537bfd0 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220525115411.65455-1-linmq006@gmail.com
2022-06-27 09:58:41 +02:00
Bo Liu
e5d6eeead8
drm/connector: Remove usage of the deprecated ida_simple_xxx API
...
Use ida_alloc_xxx()/ida_free() instead of
ida_simple_get()/ida_simple_remove().
The latter is deprecated and more verbose.
Signed-off-by: Bo Liu <liubo03@inspur.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20220617082319.7599-1-liubo03@inspur.com
Link: https://patchwork.freedesktop.org/patch/msgid/20220621190055.8323-1-jiangjian@cdjrlc.com
2022-06-25 00:04:19 +02:00
Joel Selvaraj
b00de0e237
drm/panel: introduce ebbg,ft8719 panel
...
Add DRM panel driver for EBBG FT8719 6.18" 2246x1080 DSI video mode
panel, which can be found on some Xiaomi Poco F1 phones. The panel's
backlight is managed through QCOM WLED driver.
Signed-off-by: Joel Selvaraj <jo@jsfamily.in >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB7009B6FA7F17A3DA36DDA44CD9DF9@BY5PR02MB7009.namprd02.prod.outlook.com
2022-06-24 22:35:38 +02:00
Jiasheng Jiang
831463667b
drm: bridge: adv7511: Add check for mipi_dsi_driver_register
...
As mipi_dsi_driver_register could return error if fails,
it should be better to check the return value and return error
if fails.
Moreover, if i2c_add_driver fails, mipi_dsi_driver_register
should be reverted.
Fixes: 1e4d58cd7f ("drm/bridge: adv7533: Create a MIPI DSI device")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220602103401.2980938-1-jiasheng@iscas.ac.cn
2022-06-24 22:32:02 +02:00
Stephen Kitt
25ba9429e0
drm/bridge: parade-ps8622: Use backlight helper
...
backlight_properties.fb_blank is deprecated. The states it represents
are handled by other properties; but instead of accessing those
properties directly, drivers should use the helpers provided by
backlight.h.
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Jonas Karlman <jonas@kwiboo.se >
Cc: Jernej Skrabec <jernej.skrabec@gmail.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220607181022.1119546-1-steve@sk2.org
2022-06-24 21:58:29 +02:00
Bjorn Andersson
9126ef85f2
drm/panel-edp: Add LQ140M1JW48 edp panel entry
...
Add panel identification entry for the Sharp LQ140M1JW48 eDP panel.
Due to lacking documentation, a delay similar to those for the
LQ140M1JW46 numbers are picked for now.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220608020614.4098292-1-bjorn.andersson@linaro.org
2022-06-24 21:56:27 +02:00
Bastian Krause
103f06fd47
drm/panel: simple: add AM-800600P5TMQW-TB8H
...
Add support for the Ampire AM-800600P5TMQW-TB8H 800x600 panel. Data
sheet is currently not publicly available, unfortunately.
Signed-off-by: Bastian Krause <bst@pengutronix.de >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220610111511.1421067-2-bst@pengutronix.de
2022-06-24 21:52:23 +02:00
Stephen Kitt
ad4fd3b1df
drm: shmobile: Use backlight helper
...
This started with work on the removal of backlight_properties'
deprecated fb_blank field, much of which can be taken care of by using
helper functions provided by backlight.h instead of directly accessing
fields in backlight_properties. This patch series doesn't involve
fb_blank, but it still seems useful to use helper functions where
appropriate.
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616170821.1348169-1-steve@sk2.org
2022-06-24 21:45:28 +02:00
Stephen Kitt
db475c11cd
drm/panel: panel-asus-z00t-tm5p5-n35596: Use backlight helper
...
backlight_properties.fb_blank is deprecated. The states it represents
are handled by other properties; but instead of accessing those
properties directly, drivers should use the helpers provided by
backlight.h.
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-2-steve@sk2.org
2022-06-24 21:41:51 +02:00
Stephen Kitt
91c2cbf9b6
drm/panel: panel-dsi-cm: Use backlight helpers
...
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Instead of setting the power state by manually updating fields in
struct backlight_properties, use backlight_enable() and
backlight_disable(). These also call backlight_update_status() so the
separate call is no longer needed.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-3-steve@sk2.org
2022-06-24 21:39:24 +02:00
Stephen Kitt
c974f75537
drm/panel: sony-acx565akm: Use backlight helpers
...
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Instead of manually checking the power state in struct
backlight_properties, use backlight_is_blank().
While we're at it, drop .fb_blank from the initialisation function; it
is deprecated, and this helps make progress towards enabling its
removal. This change makes no functional difference since
FB_BLANK_UNBLANK is the default value.
Signed-off-by: Stephen Kitt <steve@sk2.org >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-4-steve@sk2.org
2022-06-24 21:38:04 +02:00
Alexander Stein
d9e74da2f1
drm/panel: panel-simple: Add dev_err_probe if backlight could not be found
...
If the backlight node is not enabled, this (silently) returns with
-EPROBE_DEFER. /sys/kernel/debug/devices_deferred also shows nothing
helpful:
$ cat /sys/kernel/debug/devices_deferred
display
With this patch, there is a helpful hint:
$ cat /sys/kernel/debug/devices_deferred
display panel-simple: Could not find backlight
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220621072118.513346-1-alexander.stein@ew.tq-group.com
2022-06-24 21:34:44 +02:00
Jiang Jian
a68078b448
drm/pl111: drop unexpected word "the" in the comments
...
there is an unexpected word "the" in the comments that need to be dropped
file: drivers/gpu/drm/pl111/pl111_display.c
line: 251
* Note that the the ARM hardware's format reader takes 'r' from
changed to
* Note that the the ARM hardware's format reader takes 'r' from
Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220621133107.3752-1-jiangjian@cdjrlc.com
2022-06-24 21:32:40 +02:00
Jiang Jian
8c56d51057
drm/panel: nt35510: Remove duplicate 'the' in two places.
...
file: ./drivers/gpu/drm/panel/panel-novatek-nt35510.c
line: 193,214,253
* amplification for the the step-up circuit:
changed to
* amplification for the step-up circuit:
Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220621140151.14404-1-jiangjian@cdjrlc.com
2022-06-24 21:31:45 +02:00
Linus Torvalds
2c39d612aa
Merge tag 'for-linus-5.19a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
...
Pull xen fixes from Juergen Gross:
- A rare deadlock in Qubes-OS between the i915 driver and Xen grant
unmapping, solved by making the unmapping fully asynchronous
- A bug in the Xen blkfront driver caused by incomplete error handling
- A fix for undefined behavior (shifting a signed int by 31 bits)
- A fix in the Xen drmfront driver avoiding a WARN()
* tag 'for-linus-5.19a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/gntdev: Avoid blocking in unmap_grant_pages()
drm/xen: Add missing VM_DONTEXPAND flag in mmap callback
x86/xen: Remove undefined behavior in setup_features()
xen-blkfront: Handle NULL gendisk
2022-06-24 12:22:11 -07:00
Philip Oberfichtner
803481d869
drm/panel: simple: Add DataImage FG1001L0DSSWMG01 panel support
...
Add DataImage FG1001L0DSSWMG01 10.1" 1280x800 TFT LCD panel support.
Signed-off-by: Philip Oberfichtner <pro@denx.de >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220623112257.4178461-2-pro@denx.de
2022-06-24 19:25:24 +02:00
Yang Yingliang
e9fcc60ddd
drm/logicvc: add missing of_node_put() in logicvc_layers_init()
...
The of_node_put() need be called in error path in logicvc_layers_init().
Fixes: efeeaefe9b ("drm: Add support for the LogiCVC display controller")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614112112.1537319-1-yangyingliang@huawei.com
2022-06-24 17:23:38 +02:00
Julia Lawall
d3a4534162
drm: fix device_node_continue.cocci warnings
...
drivers/gpu/drm/logicvc/logicvc_layer.c:616:2-13: ERROR: probable double put.
Device node iterators put the previous value of the index variable, so an
explicit put causes a double put.
Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: kernel test robot <lkp@intel.com >
Signed-off-by: Julia Lawall <julia.lawall@inria.fr >
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2206121300120.3447@hadrien
2022-06-24 17:22:50 +02:00
Yang Li
f9bbc1c844
drm: Remove unnecessary print function dev_err()
...
The print function dev_err() is redundant because platform_get_irq()
already prints an error.
Eliminate the follow coccicheck warning:
./drivers/gpu/drm/logicvc/logicvc_drm.c:352:2-9: line 352 is redundant
because platform_get_irq() already prints an error
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220613012658.85814-1-yang.lee@linux.alibaba.com
2022-06-24 17:04:03 +02:00
Dan Carpenter
d54cda74a9
drm: logicvc: fix error code in logicvc_layer_init()
...
Return -EINVAL if logicvc_layer_formats_lookup() fails. Don't return
success.
Fixes: efeeaefe9b ("drm: Add support for the LogiCVC display controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/Yqh6VdNiDvJYMOQ+@kili
2022-06-24 17:03:42 +02:00
Dan Carpenter
5e8034364c
drm: logicvc: Fix uninitialized variable in probe
...
The "regmap" is supposed to be initialized to NULL but it's used
without being initialized.
Fixes: efeeaefe9b ("drm: Add support for the LogiCVC display controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/Yqh6OfSiPFuVrGo4@kili
2022-06-24 17:03:04 +02:00
KuoHsiang Chou
232b95ba4e
drm/ast: Fixed the casting issue reported by sparse
...
V1:
1.Fixed sparse:cast truncates bits form constant value ()cast
truncates bits from constant value (ffffffffffffff00 becomes 0)
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20220623083116.35365-1-kuohsiang_chou@aspeedtech.com
2022-06-24 09:37:32 +02:00
Dave Airlie
805ada63ba
Merge tag 'drm-intel-next-2022-06-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
...
- General driver clean-up (Jani, Ville, Julia)
- DG2 enabling (Anusha, Vandita)
- Fix sparse warnings (Imre, Jani)
- DMC MMIO range checks (Anusha)
- Audio related fixes (Jani)
- Runtime PM fixes (Anshuman)
- PSR fixes (Jouni, Jose)
- Media freq factor and per-gt enhancements (Ashutosh, Dale)
- DSI fixes for ICL+ (Jani)
- Disable DMC flip queue handlers (Imre)
- ADL_P voltage swing updates (Balasubramani)
- Use more the VBT for panel information (Ville, Animesh)
- Fix on Type-C ports with TBT mode (Vivek)
- Improve fastset and allow seamless M/N changes (Ville)
- Accept more fixed modes with VRR/DMRRS panels (Ville)
- FBC fix (Jose)
- Remove noise logs (Luca)
- Disable connector polling for a headless SKU (Jouni)
- Sanitize display underrun reporting (Ville)
- ADL-S display PLL w/a (Ville)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/YrNzP2WTf3WBvpvd@intel.com
2022-06-24 12:07:47 +10:00
Dave Airlie
1e9124df8b
Merge tag 'drm-msm-fixes-2022-06-20' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
...
Fixes for v5.19-rc4
- Workaround for parade DSI bridge power sequencing
- Fix for multi-planar YUV format offsets
- Limiting WB modes to max sspp linewidth
- Fixing the supported rotations to add 180 back for IGT
- Fix to handle pm_runtime_get_sync() errors to avoid unclocked access
in the bind() path for dpu driver
- Fix the irq_free() without request issue which was a being hit frequently
in CI.
- Fix to add minimum ICC vote in the msm_mdss pm_resume path to address
bootup splats
- Fix to avoid dereferencing without checking in WB encoder
- Fix to avoid crash during suspend in DP driver by ensuring interrupt
mask bits are updated
- Remove unused code from dpu_encoder_virt_atomic_check()
- Fix to remove redundant init of dsc variable
- Fix to ensure mmap offset is initialized to avoid memory corruption
from unpin/evict
- Fix double runpm disable in probe-defer path
- VMA fenced-unpin fixes
- Fix for WB max-width
- Fix for rare dp resolution change issue
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Rob Clark <robdclark@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvdsOF1-+WfTWyEyu33XPcvxOCU00G-dz7EF2J+fdyUHg@mail.gmail.com
2022-06-24 10:11:27 +10:00