linux-next: manual merge of the amdgpu tree with the drm,drm-misc tree
Mark Brown
maintainerHi all,
Today's linux-next merge of the amdgpu tree got a conflict in:
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c
between commits:
dae05bc4c8351 ("next-20260921/drm")
02ac945db0d1e ("next-20260921/drm-misc")
from the drm,drm-misc tree and commits:
cbb329ca3b386 ("drm/amd/display: Fix KUnit CRTC warnings") a3e8dc37a616d ("drm/amd/display: Fix KUnit checkpatch warnings")
from the amdgpu tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +0 -0
@@@ -42,10 -42,10 +42,10 @@@ static void dm_test_crtc_modeset_requir }/** -* dm_test_crtc_modeset_required_active_active_changed - Test Crtc modeset required active active changed +* dm_test_crtc_modeset_required_active_state_changed - Test modeset required when the active state changes * @test: The KUnit test context */ -static void dm_test_crtc_modeset_required_active_active_changed (struct kunit *test) +static void dm_test_crtc_modeset_required_active_state_changed (struct kunit *test) {struct drm_crtc_state state = {};return false; } +static int dm_test_crtc_enable_vblank (struct drm_crtc *crtc) + { +return 0 ; + } + +static void dm_test_crtc_disable_vblank (struct drm_crtc *crtc) + { + } + +static u32 dm_test_crtc_get_vblank_counter (struct drm_crtc *crtc) + { +return 0 ; + } +static const struct drm_crtc_funcs dm_test_crtc_funcs = { + .destroy = amdgpu_dm_crtc_destroy, + .atomic_duplicate_state = amdgpu_dm_crtc_duplicate_state, + .atomic_destroy_state = amdgpu_dm_crtc_destroy_state, + .enable_vblank = dm_test_crtc_enable_vblank, + .disable_vblank = dm_test_crtc_disable_vblank, + .get_vblank_counter = dm_test_crtc_get_vblank_counter, .get_vblank_timestamp = dm_test_crtc_get_vblank_timestamp, }; +static void dm_test_crtc_cleanup (void *data) + { +struct amdgpu_crtc *acrtc = data; + +if (acrtc->base.dev &&drm_dev_has_vblank (acrtc->base.dev)) +drm_crtc_vblank_off (&acrtc->base); +list_del_init (&acrtc->base.head); + } +/* * dm_test_crtc_arm_irq_src - Prime an IRQ source so get()/put() short-circuit. * @test: The KUnit test context acrtc = kunit_kzalloc(test, sizeof(*acrtc), GFP_KERNEL); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, acrtc); acrtc->base.dev = &adev->ddev; +acrtc->base.funcs = &dm_test_crtc_funcs; acrtc->base.enabled = true; acrtc->crtc_id = 0; +INIT_LIST_HEAD(&acrtc->base.head); +list_add_tail(&acrtc->base.head, &adev->ddev.mode_config.crtc_list); +KUNIT_ASSERT_EQ(test, +kunit_add_action_or_reset(test, dm_test_crtc_cleanup, acrtc), 0); link = dm_kunit_alloc_link(test); stream = dm_kunit_alloc_stream(test, link); amdgpu_dm_crtc_destroy_state(crtc, dup); } - /* Tests for amdgpu_dm_crtc_create_state() */ -/** * dm_test_crtc_duplicate_state_retains_stream - Test duplicate retains the stream * @test: The KUnit test context KUNIT_EXPECT_NULL(test, amdgpu_dm_crtc_duplicate_state(crtc)); } -/* Tests for amdgpu_dm_crtc_destroy() */ -/** * dm_test_crtc_destroy_cleans_up_and_frees - Test destroy tears down the CRTC * @test: The KUnit test context KUNIT_EXPECT_EQ(test, adev->ddev.mode_config.num_crtc, 0); } - /* Tests for amdgpu_dm_crtc_destroy() */ +/* Tests for amdgpu_dm_crtc_create_state() */ /** * dm_test_crtc_create_state_allocates_state - Test create_state allocates a fresh state old->stream = stream; crtc->state = &old->base; - amdgpu_dm_crtc_reset_state(crtc); +amdgpu_dm_crtc_create_state(crtc); /* Old state was destroyed (stream ref dropped) and a new one installed. */ KUNIT_EXPECT_EQ (test,kref_read (&stream->refcount),1 );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, event); acrtc->base.dev = &adev->ddev; + acrtc->base.funcs = &dm_test_crtc_funcs; +INIT_LIST_HEAD (&acrtc->base.head); +list_add_tail (&acrtc->base.head, &adev->ddev.mode_config.crtc_list); +KUNIT_ASSERT_EQ (test, +kunit_add_action_or_reset (test, dm_test_crtc_cleanup, acrtc),0 ); acrtc->event = event; acrtc->pflip_status =AMDGPU_FLIP_SUBMITTED ;KUNIT_ASSERT_NOT_ERR_OR_NULL (test, event); acrtc->base.dev = &adev->ddev; + acrtc->base.funcs = &dm_test_crtc_funcs; +INIT_LIST_HEAD (&acrtc->base.head); +list_add_tail (&acrtc->base.head, &adev->ddev.mode_config.crtc_list); +KUNIT_ASSERT_EQ (test, +kunit_add_action_or_reset (test, dm_test_crtc_cleanup, acrtc),0 ); acrtc->event = event; acrtc->pflip_status =AMDGPU_FLIP_NONE ;static struct kunit_case amdgpu_dm_crtc_tests[] = {/* amdgpu_dm_crtc_modeset_required */ KUNIT_CASE (dm_test_crtc_modeset_required_active_mode_changed), -KUNIT_CASE (dm_test_crtc_modeset_required_active_active_changed), +KUNIT_CASE (dm_test_crtc_modeset_required_active_state_changed),KUNIT_CASE (dm_test_crtc_modeset_required_active_connectors_changed),KUNIT_CASE (dm_test_crtc_modeset_required_inactive),KUNIT_CASE (dm_test_crtc_modeset_required_no_changes),KUNIT_CASE (dm_test_count_crtc_active_planes_mixed),/* amdgpu_dm_crtc_duplicate_state */ KUNIT_CASE (dm_test_crtc_duplicate_state_copies_fields), -/* amdgpu_dm_crtc_create_state */ -KUNIT_CASE (dm_test_crtc_create_state_allocates_state),KUNIT_CASE (dm_test_crtc_duplicate_state_retains_stream),KUNIT_CASE (dm_test_crtc_duplicate_state_null_state_returns_null),/* amdgpu_dm_crtc_destroy */ KUNIT_CASE (dm_test_crtc_destroy_cleans_up_and_frees), +/* amdgpu_dm_crtc_create_state */ +KUNIT_CASE (dm_test_crtc_create_state_allocates_state), +KUNIT_CASE (dm_test_crtc_reset_state_replaces_existing),/* amdgpu_dm_crtc_destroy_state */ KUNIT_CASE (dm_test_crtc_destroy_state_no_stream),KUNIT_CASE (dm_test_crtc_destroy_state_releases_stream),