- 26 10月, 2022 1 次提交
-
-
由 Zack Rusin 提交于
Trivial removal of an unused variable. Not sure how it snuck by me and build bots in the 7c99616e. Fixes: 7c99616e ("drm: Remove drm_mode_config::fb_base") Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Thomas Zimmermann <tzimemrmann@suse.de> Cc: Christian König <christian.koenig@amd.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: NLyude Paul <lyude@redhat.com> Signed-off-by: NZack Rusin <zackr@vmware.com> Signed-off-by: NLyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221021010703.536318-1-zack@kde.orgSigned-off-by: NDave Airlie <airlied@redhat.com>
-
- 21 10月, 2022 1 次提交
-
-
由 Alistair Popple 提交于
Commit 16ce101d ("mm/memory.c: fix race when faulting a device private page") changed the migrate_to_ram() callback to take a reference on the device page to ensure it can't be freed while handling the fault. Unfortunately the corresponding update to Nouveau to accommodate this change was inadvertently dropped from that patch causing GPU to CPU migration to fail so add it here. Link: https://lkml.kernel.org/r/20221019122934.866205-1-apopple@nvidia.com Fixes: 16ce101d ("mm/memory.c: fix race when faulting a device private page") Signed-off-by: NAlistair Popple <apopple@nvidia.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
-
- 20 10月, 2022 5 次提交
-
-
由 Alex Deucher 提交于
Commit 8795e182 ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") uncovered a bug in amdgpu that required a reordering of the driver init sequence to avoid accessing a special register on the GPU before it was properly set up leading to an PCI AER error. This reordering uncovered a different hw programming ordering dependency in some APUs where the SDMA doorbells need to be programmed before the GFX doorbells. To fix this, move the SDMA doorbell programming back into the soc15 common code, but use the actual doorbell range values directly rather than the values stored in the ring structure since those will not be initialized at this point. This is a partial revert, but with the doorbell assignment fixed so the proper doorbell index is set before it's used. Fixes: e3163bc8 ("drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega") Acked-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NAlex Deucher <alexander.deucher@amd.com> Cc: skhan@linuxfoundation.org Cc: stable@vger.kernel.org
-
由 Steven Price 提交于
__le32 and __le64 types aren't portable and are not available on FreeBSD (which uses the same uAPI). Instead of attempting to always output little endian, just use native endianness in the dumps. Tools can detect the endianness in use by looking at the 'magic' field, but equally we don't expect big-endian to be used with Mali (there are no known implementations out there). Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7252 Fixes: 730c2bf4 ("drm/panfrost: Add support for devcoredump") Reviewed-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221017104602.142992-3-steven.price@arm.com
-
由 Maxime Ripard 提交于
Commit 35a3b82f ("drm/connector: Introduce drmm_connector_init") introduced the function drmm_connector_init() with a parameter for an optional ddc pointer to the i2c controller used to access the DDC bus. However, the underlying call to __drm_connector_init() was always setting it to NULL instead of passing the ddc argument around. This resulted in unexpected null pointer dereference on platforms expecting to get a DDC controller. Fixes: 35a3b82f ("drm/connector: Introduce drmm_connector_init") Reviewed-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20221019143442.1798964-1-maxime@cerno.techSigned-off-by: NMaxime Ripard <maxime@cerno.tech>
-
由 David Gow 提交于
The xrgb2101010 format conversion test (unlike for other formats) does an endianness conversion on the results. However, it always converts TEST_BUF_SIZE 32-bit integers, which results in reading from (and writing to) more memory than in present in the result buffer. Instead, use the buffer size, divided by sizeof(u32). The issue could be reproduced with KASAN: ./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/tests \ --kconfig_add CONFIG_KASAN=y --kconfig_add CONFIG_KASAN_VMALLOC=y \ --kconfig_add CONFIG_KASAN_KUNIT_TEST=y \ drm_format_helper_test.*xrgb2101010 Reported-by: NLinux Kernel Functional Testing <lkft@linaro.org> Fixes: 45311431 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()") Signed-off-by: NDavid Gow <davidgow@google.com> Reviewed-by: NMaíra Canal <mairacanal@riseup.net> Reviewed-by: NJavier Martinez Canillas <javierm@redhat.com> Reviewed-by: NJosé Expósito <jose.exposito89@gmail.com> Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221019073239.3779180-1-davidgow@google.com
-
由 Zack Rusin 提交于
The fb_base in struct drm_mode_config has been unused for a long time. Some drivers set it and some don't leading to a very confusing state where the variable can't be relied upon, because there's no indication as to which driver sets it and which doesn't. The only usage of fb_base is internal to two drivers so instead of trying to force it into all the drivers to get it into a coherent state completely remove it. Signed-off-by: NZack Rusin <zackr@vmware.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NThomas Zimmermann <tzimemrmann@suse.de> Acked-by: NChristian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221019024401.394617-1-zack@kde.org
-
- 19 10月, 2022 33 次提交
-
-
由 Laurent Pinchart 提交于
Add partial live video support, with a single video input that bypasses blending. Skip registration of the DRM device in that case, but register the DRM bridge instead. The DRM device will be created by the driver for the display controller in the PL. Full live video mode with concurrent usage of the video and gfx inputs, and blending in the DPSUB video pipeline, is currently unsupported. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for usage of the DPSUB as a DisplayPort bridge without creating a DRM device, make initialization and usage of the DMA engine optional. The flag that controls this feature is currently hardcoded to operating with the DMA engine, this will be made dynamic based on the device tree configuration in a subsequent change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Add a mode parameter to the zynqmp_disp_layer_enable() to set the layer mode, to prepare for live mode support. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for live video input support, parse the device tree to find the connected ports. Warn about unsupported configurations, and error out when invalid. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The better convey its purpose, rename the zynqmp_dpsub_handle_vblank() function that belongs to the DRM layer to zynqmp_dpsub_drm_handle_vblank(). Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To complete the decoupling of the DRM device from the zynqmp_dpsub, group all DRM-related structures in a zynqmp_dpsub_drm structure and allocate it separately from the zynqmp_dpsub. The DRM managed allocation of the drm_device now doesn't cover the zynqmp_dpsub anymore, so we need to register a cleanup action to release the zynqmp_dpsub when the drm_device is released. The will allow usage of the DisplayPort encoder as a standalone bridge, without registering a DRM device in this driver. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Continue the isolation of DRM/KMS code by moving all DRM init and cleanup from zynqmp_dpsub.c to zynqmp_kms.c. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The zynqmp_disp and zynqmp_dp structures are allocated with drmm_kzalloc(). While this simplifies management of memory, it requires a DRM device, which will not be available at probe time when the DP bridge will be used standalone, with a DRM device in the PL. To prepare for this, switch to manual allocation for zynqmp_disp and zynqmp_dp. The cleanup still uses the DRM managed infrastructure, but one level up, at the top level. This will be addressed separately. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
There's no need to delay bridge initialization, move it to zynqmp_dp_probe() and drop the zynqmp_dp_drm_init() function. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for operating as a standalone DP bridge with the DRM device implemented in the PL, move registration of the AUX bus to bridge attach time, as that's the earliest point when a DRM device is available. The DRM device pointer stored in zynqmp_dp isn't used anymore, drop it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Decouple the planes handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c. This prepares for using the DPSUB with a live video input, without creating DRM planes in the DPSUB driver. While at it, fix a typo in a comment. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Decouple the CRTC handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c. This prepares for using the DPSUB with a live video input, without creating a DRM CRTC in the DPSUB driver. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Start preparation for using the DPSUB as a standalone DisplayPort encoder without a display controller by moving the DRM/KMS initialization to a new zynqmp_kms.c file. No functional change intended. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Decouple the zynqmp_disp, which handles the hardware configuration, from the DRM planes by moving the planes to the zynqmp_dpsub structure. The planes handling code will be moved to a separate file in a subsequent step. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Decouple the zynqmp_disp, which handles the hardware configuration, from the DRM CRTC by moving the CRTC to the zynqmp_dpsub structure. The CRTC handling code will be moved to a separate file in a subsequent step. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The audio clock is an external resource from the DPSUB point of view, not a resource internal to the display controller. Move it to the zynqmp_dpsub structure, to allow accessing it from outside the disp code. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The video clock is an external resource from the DPSUB point of view, not a resource internal to the display controller. Move it to the zynqmp_dpsub structure, to allow accessing it from outside the disp code. While at it, rename the fields from pclk and pclk_from_ps to vid_clk and vid_clk_from_ps, to better reflect their purpose and match the documentation. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The array of formats passed to drm_universal_plane_init() doesn't need to outlive the function call, as it's copied internally. Use kcalloc() instead of drmm_kcalloc() to allocate it, and free it right after usage. While at it, move the allocation and initialization of the formats array to a separate function, to prepare for splitting the DRM plane handling to a separate file. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Use the ARRAY_SIZE() macro to iterate over arrays, instead of hardcoding their size. This makes the code less error-prone should the array size change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The zynqmp_disp_layer_set_format() function only needs format information, not a full plane state. Get the necessary info from the plane state in the caller and pass it to zynqmp_disp_layer_set_format(). This prepares for calling the function from non-DRM code. This doesn't introduce any functional change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Reuse the local info variable instead of going through the layer pointer in zynqmp_disp_layer_update(). This doesn't introduce any functional change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for control of the blender outside of the CRTC code, move the setup of the blender to the zynqmp_disp_enable() function. This doesn't introduce any functional change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for usage of the clock setup function outside of the CRTC code, replace the DRM-specific structures passed as parameters with a pointer to the zynqmp_disp and the requested clock rate. This doesn't introduce any functional change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The bus_fmt field of the zynqmp_disp_format structure is unused. Drop it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The event field of the zynqmp_disp structure is unused. Drop it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Now that the driver uses the connector bridge helper, HPD can be reported directly for the connector through the drm_bridge_hpd_notify() function. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Replace the manual connector implementation and registration in the DP encoder with the DRM connector bridge helper. This removes boilerplate code and simplifies the driver. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The next component in the display chain, after the DP encoder, is most likely a DP connector. The display connector driver registers a bridge for it. That bridge doesn't need to be controlled, but is needed in order to use the DRM connector bridge helper. Retrieve it at init time, and attach to it in the DP bridge attach handler. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
As part of the transitition of the DP encoder to a DRM bridge, turn the DRM encoder into a dummy encoder and move it out of the DP code, to the DPSUB core. DP encoder operations are handled by the DP bridge, which is now attached to the encoder. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
Connector creation requires the DRM encoder, and it thus typically performed in the bridge attach operation. Move it there, to prepare for registration of the DRM bridge. For now the zynqmp_dp_bridge_attach() is called manually at initialization time. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
To prepare for the removal of the connector from the DP encoder, pass the display info pointer to the zynqmp_dp_set_format() function instead of accessing the connector internally. The display info is NULL when the function is called at initialization time, as we have no display info at that point. This doesn't change the existing behaviour, given that the zynqmp_dp_set_format() was already handling this as a special case (the display info isn't initialized at init time and is all zeroes). Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The DP encoder is currently modelled as a DRM encoder and DRM connector. This doesn't support system configurations where the DP encoder is driven by the FPGA programmable logic, using the live video input to the DP subsystem. To enable such use cases, we need to model the encoder as a DRM bridge. As a first step, create a DRM bridge in the DP encoder driver. Move and delegate the implementation of the DRM encoder and connector operations to the bridge to prepare for the transition. The bridge will be registered with the DRM core as a separate change. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-
由 Laurent Pinchart 提交于
The zynqmp_dp_encoder_mode_set_transfer_unit() function takes a mode pointer argument that it doesn't need to modify. Make it const. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
-