[PATCH 3/9] drm: Add simplekms driver

Thomas Zimmermann tzimmermann at suse.de
Mon Sep 28 07:25:12 UTC 2020


Hi

Am 25.09.20 um 17:14 schrieb Maxime Ripard:
> Hi Thomas,
> 
> On Fri, Sep 25, 2020 at 05:01:23PM +0200, Thomas Zimmermann wrote:
>>>> +					   ARRAY_SIZE(simplekms_formats),
>>>> +					   simplekms_format_modifiers,
>>>> +					   connector);
>>>> +	if (ret)
>>>> +		return ret;
>>>> +
>>>> +	drm_mode_config_reset(dev);
>>>
>>> This breaks fastboot. I think ideally we'd have the state represent
>>> everything is on, and allocate an fb + buffer with the current contents of
>>> the framebuffer. Since we can allocate an fb that matches this shouldn't
>>> be a problem, just a raw memcpy_fromio should do the job.
>>
>> I'm trying to wrap my head around how the fastboot setup is implemented.
>>
>> Apparently, i915's fbdev code goes through the existing pipeline state
>> and fills the fb_info structure with compatible settings.
>>
>> Where is the initial pipeline state created? If I write reset handlers
>> that initialize the pipeline to the simple-framebuffer's fixed state,
>> whould that be sufficient? A later stage could then do the equivalent of
>> intel_fbdev_init_bios().
>>
>> The simple-kms helpers don't seem to support custom reset handlers or
>> atomic-state callbacks. I guess that would require and update as well?
> 
> You probably want to read the following :)
> 
> https://lore.kernel.org/dri-devel/CAKMK7uHtqHy_oz4W7F+hmp9iqp7W5Ra8CxPvJ=9BwmvfU-O0gg@mail.gmail.com/
> 
> It's been on my todo-list since, but I never got to work on it :/

Thanks for the pointer. This looks like the optimal solution, although
overkill for this simple use case.

For now, I'll probably initialize the state during initialization. When
the readout helpers materialize, I'll convert the driver.

Best regards
Thomas

> 
> Maxime
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200928/d4cdb28c/attachment.sig>


More information about the dri-devel mailing list