[PATCH 1/2] drm/cirrus: Use virtual encoder and connector types

Thomas Zimmermann tzimmermann at suse.de
Mon Nov 25 10:39:56 UTC 2024


Hi


Am 23.11.24 um 17:28 schrieb Dmitry Baryshkov:
> On Tue, Oct 29, 2024 at 03:34:23PM +0100, Thomas Zimmermann wrote:
>> The cirrus driver only works on emulated Cirrus hardware. Use the
>> correct types for encoder and connector.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> ---
>>   drivers/gpu/drm/tiny/cirrus.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
>> index f06a2be71f60..0231bdf94b8a 100644
>> --- a/drivers/gpu/drm/tiny/cirrus.c
>> +++ b/drivers/gpu/drm/tiny/cirrus.c
>> @@ -587,14 +587,14 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus)
>>   
>>   	encoder = &cirrus->encoder;
>>   	ret = drm_encoder_init(dev, encoder, &cirrus_encoder_funcs,
>> -			       DRM_MODE_ENCODER_DAC, NULL);
>> +			       DRM_MODE_ENCODER_VIRTUAL, NULL);
>>   	if (ret)
>>   		return ret;
>>   	encoder->possible_crtcs = drm_crtc_mask(crtc);
>>   
>>   	connector = &cirrus->connector;
>>   	ret = drm_connector_init(dev, connector, &cirrus_connector_funcs,
>> -				 DRM_MODE_CONNECTOR_VGA);
>> +				 DRM_MODE_CONNECTOR_VIRTUAL);
> This will also remove the EDID property from this connector. I'm not
> sore if that is an expected behaviour or not.

Indeed. That's a positive side effect IMHO. The cirrus emulation nor 
driver provides an EDID. By removing the property, we stop pretending 
that there could be one. I'll mention this in the changelog before 
committing.

Best regards
Thomas

>
>>   	if (ret)
>>   		return ret;
>>   	drm_connector_helper_add(connector, &cirrus_connector_helper_funcs);
>> -- 
>> 2.46.0
>>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list