@@ -682,10 +682,11 @@ static void drm_vc4_test_pv_muxing(struct kunit *test)
682
682
int ret ;
683
683
684
684
for (i = 0 ; i < params -> nencoders ; i ++ ) {
685
+ struct vc4_dummy_output * output ;
685
686
enum vc4_encoder_type enc_type = params -> encoders [i ];
686
687
687
- ret = vc4_mock_atomic_add_output (test , state , enc_type );
688
- KUNIT_ASSERT_EQ (test , ret , 0 );
688
+ output = vc4_mock_atomic_add_output (test , state , enc_type );
689
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
689
690
}
690
691
691
692
ret = drm_atomic_check_only (state );
@@ -711,10 +712,11 @@ static void drm_vc4_test_pv_muxing_invalid(struct kunit *test)
711
712
int ret ;
712
713
713
714
for (i = 0 ; i < params -> nencoders ; i ++ ) {
715
+ struct vc4_dummy_output * output ;
714
716
enum vc4_encoder_type enc_type = params -> encoders [i ];
715
717
716
- ret = vc4_mock_atomic_add_output (test , state , enc_type );
717
- KUNIT_ASSERT_EQ (test , ret , 0 );
718
+ output = vc4_mock_atomic_add_output (test , state , enc_type );
719
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
718
720
}
719
721
720
722
ret = drm_atomic_check_only (state );
@@ -784,6 +786,7 @@ static void drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable(struct kunit *tes
784
786
{
785
787
struct drm_modeset_acquire_ctx * ctx ;
786
788
struct drm_atomic_state * state ;
789
+ struct vc4_dummy_output * output ;
787
790
struct vc4_crtc_state * new_vc4_crtc_state ;
788
791
struct vc4_hvs_state * new_hvs_state ;
789
792
unsigned int hdmi0_channel ;
@@ -802,8 +805,8 @@ static void drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable(struct kunit *tes
802
805
state = drm_kunit_helper_atomic_state_alloc (test , drm , ctx );
803
806
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , state );
804
807
805
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
806
- KUNIT_ASSERT_EQ (test , ret , 0 );
808
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
809
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
807
810
808
811
ret = drm_atomic_check_only (state );
809
812
KUNIT_ASSERT_EQ (test , ret , 0 );
@@ -825,8 +828,8 @@ static void drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable(struct kunit *tes
825
828
state = drm_kunit_helper_atomic_state_alloc (test , drm , ctx );
826
829
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , state );
827
830
828
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
829
- KUNIT_ASSERT_EQ (test , ret , 0 );
831
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
832
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
830
833
831
834
ret = drm_atomic_check_only (state );
832
835
KUNIT_ASSERT_EQ (test , ret , 0 );
@@ -856,6 +859,7 @@ static void drm_test_vc5_pv_muxing_bugs_stable_fifo(struct kunit *test)
856
859
{
857
860
struct drm_modeset_acquire_ctx * ctx ;
858
861
struct drm_atomic_state * state ;
862
+ struct vc4_dummy_output * output ;
859
863
struct vc4_crtc_state * new_vc4_crtc_state ;
860
864
struct vc4_hvs_state * new_hvs_state ;
861
865
unsigned int old_hdmi0_channel ;
@@ -874,11 +878,11 @@ static void drm_test_vc5_pv_muxing_bugs_stable_fifo(struct kunit *test)
874
878
state = drm_kunit_helper_atomic_state_alloc (test , drm , ctx );
875
879
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , state );
876
880
877
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
878
- KUNIT_ASSERT_EQ (test , ret , 0 );
881
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
882
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
879
883
880
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
881
- KUNIT_ASSERT_EQ (test , ret , 0 );
884
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
885
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
882
886
883
887
ret = drm_atomic_check_only (state );
884
888
KUNIT_ASSERT_EQ (test , ret , 0 );
@@ -951,6 +955,7 @@ drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable_too_many_crtc_state(struct ku
951
955
{
952
956
struct drm_modeset_acquire_ctx * ctx ;
953
957
struct drm_atomic_state * state ;
958
+ struct vc4_dummy_output * output ;
954
959
struct vc4_crtc_state * new_vc4_crtc_state ;
955
960
struct drm_device * drm ;
956
961
struct vc4_dev * vc4 ;
@@ -966,8 +971,8 @@ drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable_too_many_crtc_state(struct ku
966
971
state = drm_kunit_helper_atomic_state_alloc (test , drm , ctx );
967
972
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , state );
968
973
969
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
970
- KUNIT_ASSERT_EQ (test , ret , 0 );
974
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI0 );
975
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
971
976
972
977
ret = drm_atomic_check_only (state );
973
978
KUNIT_ASSERT_EQ (test , ret , 0 );
@@ -978,8 +983,8 @@ drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enable_too_many_crtc_state(struct ku
978
983
state = drm_kunit_helper_atomic_state_alloc (test , drm , ctx );
979
984
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , state );
980
985
981
- ret = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
982
- KUNIT_ASSERT_EQ (test , ret , 0 );
986
+ output = vc4_mock_atomic_add_output (test , state , VC4_ENCODER_TYPE_HDMI1 );
987
+ KUNIT_ASSERT_NOT_ERR_OR_NULL (test , output );
983
988
984
989
ret = drm_atomic_check_only (state );
985
990
KUNIT_ASSERT_EQ (test , ret , 0 );
0 commit comments