[PATCH] drm: Remove drm_mode_config::fb_base

Thomas Zimmermann tzimmermann at suse.de
Wed Oct 19 07:32:26 UTC 2022


Hi

Am 18.10.22 um 17:52 schrieb Zack Rusin:
[...]
>>>    
>>> @@ -527,7 +527,7 @@ void psb_modeset_init(struct drm_device *dev)
>>>    
>>>    	/* set memory base */
>>>    	/* Oaktrail and Poulsbo should use BAR 2*/
>>> -	pci_read_config_dword(pdev, PSB_BSM, (u32 *)&(dev->mode_config.fb_base));
>>> +	pci_read_config_dword(pdev, PSB_BSM, (u32 *)&(dev_priv->fb_base));
>>
>> Although probably correct, that code looks questionable. Maybe have a
>> local fb_base of type u32 and assign that to the field in dev_priv. It's
>> the safe variant.
>>
> 
> I thought the same, but I don't have a psb system to test so I opted to preserve
> exactly what the code was doing before. fb_base in either case is a resource_size_t,
> and I'm guessing the entire thing depends, in either case, on drm_psb_private being
> kzalloc's. I'm happy to change to just use a local u32 but I can't test it so if
> there's some side-effect to upper bits in fb_base in that driver we'll break it.

IIRC PSB hardware is only available in 32-bit systems.

Best regards
Thomas


-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221019/f6f6b3af/attachment.sig>


More information about the dri-devel mailing list