Re: [PATCH] drm: Remove drm_mode_config::fb_base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux