mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
Merge tag 'drm-misc-next-2025-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.16-rc1: UAPI Changes: - Add ASAHI uapi header! - Add apple fourcc modifiers. - Add capset virtio definitions to UAPI. - Extend EXPORT_SYNC_FILE for timeline syncobjs. Cross-subsystem Changes: - Adjust DMA-BUF sg handling to not cache map on attach. - Update drm/ci, hlcdc, virtio, maintainers. - Update fbdev todo. - Allow setting dma-device for dma-buf import. - Export efi_mem_desc_lookup to make efidrm build as a module. Core Changes: - Update drm scheduler docs. - Use the correct resv object in TTM delayed destroy. - Fix compiler warning with panic qr code, and other small fixes. - drm/ci updates. - Add debugfs file for listing all bridges. - Small fixes to drm/client, ttm tests. - Add documentation to display/hdmi. - Add kunit tests for bridges. - Dont fail managed device probing if connector polling fails. - Create Kconfig.debug for drm core. - Add tests for the drm scheduler. - Add and use new access helpers for DPCPD. - Add generic and optimized conversions for format-helper. - Begin refcounting panel for improving lifetime handling. - Unify simpledrm and ofdrm sysfb, and add extra features. - Split hdmi audio in bridge to make DP audio work. Driver Changes: - Convert drivers to use devm_platform_ioremap_resource(). - Assorted small fixes to imx/legacy-bridg, gma500, pl111, nouveau, vc4, vmwgfx, ast, mxsfb, xlnx, accel/qaic, v3d, bridge/imx8qxp-ldb, ofdrm, bridge/fsl-ldb, udl, bridge/ti-sn65dsi86, bridge/anx7625, cirrus-qemu, bridge/cdns-dsi, panel/sharp, panel/himax, bridge/sil902x, renesas, imagination, various panels. - Allow attaching more display to vkms. - Add Powertip PH128800T004-ZZA01 panel. - Add rotation quirk for ZOTAC panel. - Convert bridge/tc358775 to atomic. - Remove deprecated panel calls from synaptics, novatek, samsung panels. - Refactor shmem helper page pinning and accel drivers using it. - Add dmabuf support to accel/amdxdna. - Use 4k page table format for panfrost/mediatek. - Add common powerup/down dp link helper and use it. - Assorted compiler warning fixes. - Support dma-buf import for renesas Signed-off-by: Dave Airlie <airlied@redhat.com> # Conflicts: # include/drm/drm_kunit_helpers.h From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://lore.kernel.org/r/e147ff95-697b-4067-9e2e-7cbd424e162a@linux.intel.com
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_atomic_uapi.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_edid.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
@@ -271,6 +272,66 @@ drm_kunit_helper_create_crtc(struct kunit *test,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_kunit_helper_create_crtc);
|
||||
|
||||
/**
|
||||
* drm_kunit_helper_enable_crtc_connector - Enables a CRTC -> Connector output
|
||||
* @test: The test context object
|
||||
* @drm: The device to alloc the plane for
|
||||
* @crtc: The CRTC to enable
|
||||
* @connector: The Connector to enable
|
||||
* @mode: The display mode to configure the CRTC with
|
||||
* @ctx: Locking context
|
||||
*
|
||||
* This function creates an atomic update to enable the route from @crtc
|
||||
* to @connector, with the given @mode.
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
* A pointer to the new CRTC, or an ERR_PTR() otherwise. If the error
|
||||
* returned is EDEADLK, the entire atomic sequence must be restarted.
|
||||
*/
|
||||
int drm_kunit_helper_enable_crtc_connector(struct kunit *test,
|
||||
struct drm_device *drm,
|
||||
struct drm_crtc *crtc,
|
||||
struct drm_connector *connector,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
struct drm_atomic_state *state;
|
||||
struct drm_connector_state *conn_state;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
int ret;
|
||||
|
||||
state = drm_kunit_helper_atomic_state_alloc(test, drm, ctx);
|
||||
if (IS_ERR(state))
|
||||
return PTR_ERR(state);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, connector);
|
||||
if (IS_ERR(conn_state))
|
||||
return PTR_ERR(conn_state);
|
||||
|
||||
ret = drm_atomic_set_crtc_for_connector(conn_state, crtc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
crtc_state = drm_atomic_get_crtc_state(state, crtc);
|
||||
if (IS_ERR(crtc_state))
|
||||
return PTR_ERR(crtc_state);
|
||||
|
||||
ret = drm_atomic_set_mode_for_crtc(crtc_state, mode);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
crtc_state->enable = true;
|
||||
crtc_state->active = true;
|
||||
|
||||
ret = drm_atomic_commit(state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_kunit_helper_enable_crtc_connector);
|
||||
|
||||
static void kunit_action_drm_mode_destroy(void *ptr)
|
||||
{
|
||||
struct drm_display_mode *mode = ptr;
|
||||
|
||||
Reference in New Issue
Block a user