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

2022-10-21 Thread Patrik Jakobsson
On Wed, Oct 19, 2022 at 1:11 PM andriy.shevche...@linux.intel.com
 wrote:
>
> On Wed, Oct 19, 2022 at 09:32:26AM +0200, Thomas Zimmermann wrote:
> > Am 18.10.22 um 17:52 schrieb Zack Rusin:
>
> > IIRC PSB hardware is only available in 32-bit systems.
>
> Dunno about deep details, but IIUC the Intel Tangier and Intel Annioedale
> are 64-bit SoCs that have Imagination + Intel IPs, the latter from this
> GMA5xx/GMA6xx family.

I believe those are Merrifield and Moorefield. gma500 doesn't support
them. However 64-bit Cedarview is supported. The register PSB_BSM is
the base of stolen memory which is set by BIOS. IIRC the SGX only
supports 32-bit addresses so I would be surprised if PSB_BSM would
ever be longer than 32-bits.

-Patrik


>
> --
> With Best Regards,
> Andy Shevchenko
>
>


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

2022-10-19 Thread Thomas Zimmermann



Am 19.10.22 um 13:08 schrieb andriy.shevche...@linux.intel.com:

On Wed, Oct 19, 2022 at 09:32:26AM +0200, Thomas Zimmermann wrote:

Am 18.10.22 um 17:52 schrieb Zack Rusin:



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


Dunno about deep details, but IIUC the Intel Tangier and Intel Annioedale
are 64-bit SoCs that have Imagination + Intel IPs, the latter from this
GMA5xx/GMA6xx family.


Ok :|





--
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


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-10-19 Thread andriy.shevche...@linux.intel.com
On Wed, Oct 19, 2022 at 09:32:26AM +0200, Thomas Zimmermann wrote:
> Am 18.10.22 um 17:52 schrieb Zack Rusin:

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

Dunno about deep details, but IIUC the Intel Tangier and Intel Annioedale
are 64-bit SoCs that have Imagination + Intel IPs, the latter from this
GMA5xx/GMA6xx family.

-- 
With Best Regards,
Andy Shevchenko




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

2022-10-19 Thread Thomas Zimmermann

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


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-10-18 Thread Zack Rusin
On Tue, 2022-10-18 at 16:05 +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 18.10.22 um 15:17 schrieb Zack Rusin:
> > From: Zack Rusin 
> > 
> > The fb_base in struct drm_mode_config has been unused for a long time.
> > Some drivers set it and some don't leading to a very confusing state
> > where the variable can't be relied upon, because there's no indication
> > as to which driver sets it and which doesn't.
> > 
> > The only usage of fb_base is internal to two drivers so instead of trying
> > to force it into all the drivers to get it into a coherent state
> > completely remove it.
> 
> Thanks a lot. I wanted to remove that field for some time. Pleaser see 
> my comments below.
> 
> > 
> > Signed-off-by: Zack Rusin 
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c  | 2 --
> >   drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 2 --
> >   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 2 --
> >   drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 -
> >   drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 --
> >   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
> >   drivers/gpu/drm/ast/ast_mode.c| 1 -
> >   drivers/gpu/drm/gma500/framebuffer.c  | 6 +++---
> >   drivers/gpu/drm/gma500/psb_drv.h  | 1 +
> >   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   | 1 -
> >   drivers/gpu/drm/mgag200/mgag200_mode.c| 1 -
> >   drivers/gpu/drm/msm/msm_fbdev.c   | 2 --
> >   drivers/gpu/drm/nouveau/nouveau_display.c | 1 -
> >   drivers/gpu/drm/nouveau/nv04_fbcon.c  | 6 --
> >   drivers/gpu/drm/omapdrm/omap_fbdev.c  | 2 --
> >   drivers/gpu/drm/qxl/qxl_display.c | 2 --
> >   drivers/gpu/drm/radeon/radeon_display.c   | 2 --
> >   drivers/gpu/drm/radeon/radeon_fb.c| 1 -
> >   drivers/gpu/drm/tegra/fb.c| 1 -
> >   drivers/gpu/drm/tiny/bochs.c  | 1 -
> >   include/drm/drm_mode_config.h | 2 --
> >   21 files changed, 8 insertions(+), 33 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c 
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> > index f4b5301ea2a0..09dec2561adf 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> > @@ -498,8 +498,6 @@ static int amdgpu_vkms_sw_init(void *handle)
> > adev_to_drm(adev)->mode_config.preferred_depth = 24;
> > adev_to_drm(adev)->mode_config.prefer_shadow = 1;
> >   
> > -   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> > -
> > r = amdgpu_display_modeset_create_props(adev);
> > if (r)
> > return r;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c 
> > b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> > index 288fce7dc0ed..05051d5d2ec3 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> > @@ -2800,8 +2800,6 @@ static int dce_v10_0_sw_init(void *handle)
> >   
> > adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
> >   
> > -   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> > -
> > r = amdgpu_display_modeset_create_props(adev);
> > if (r)
> > return r;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c 
> > b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> > index cbe5250b31cb..c928bc9eb202 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> > @@ -2918,8 +2918,6 @@ static int dce_v11_0_sw_init(void *handle)
> >   
> > adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
> >   
> > -   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> > -
> > r = amdgpu_display_modeset_create_props(adev);
> > if (r)
> > return r;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c 
> > b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> > index b1c44fab074f..62315fd5a05f 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> > @@ -2675,7 +2675,6 @@ static int dce_v6_0_sw_init(void *handle)
> > adev_to_drm(adev)->mode_config.preferred_depth = 24;
> > adev_to_drm(adev)->mode_config.prefer_shadow = 1;
> > adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
> > -   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> >   
> > r = amdgpu_display_modeset_create_props(adev);
> > if (r)
> > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c 
> > b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> > index a22b45c92792..87d5e4c21cb3 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> > @@ -2701,8 +2701,6 @@ static int dce_v8_0_sw_init(void *handle)
> >   
> > adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
> >   
> > -   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> 

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

2022-10-18 Thread Laurent Pinchart
Hi Zack,

Thank you for the patch.

On Tue, Oct 18, 2022 at 09:17:45AM -0400, Zack Rusin wrote:
> From: Zack Rusin 
> 
> The fb_base in struct drm_mode_config has been unused for a long time.
> Some drivers set it and some don't leading to a very confusing state
> where the variable can't be relied upon, because there's no indication
> as to which driver sets it and which doesn't.
> 
> The only usage of fb_base is internal to two drivers so instead of trying
> to force it into all the drivers to get it into a coherent state
> completely remove it.
> 
> Signed-off-by: Zack Rusin 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c  | 2 --
>  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 2 --
>  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 2 --
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 -
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 --
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
>  drivers/gpu/drm/ast/ast_mode.c| 1 -
>  drivers/gpu/drm/gma500/framebuffer.c  | 6 +++---
>  drivers/gpu/drm/gma500/psb_drv.h  | 1 +
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   | 1 -
>  drivers/gpu/drm/mgag200/mgag200_mode.c| 1 -
>  drivers/gpu/drm/msm/msm_fbdev.c   | 2 --
>  drivers/gpu/drm/nouveau/nouveau_display.c | 1 -
>  drivers/gpu/drm/nouveau/nv04_fbcon.c  | 6 --
>  drivers/gpu/drm/omapdrm/omap_fbdev.c  | 2 --
>  drivers/gpu/drm/qxl/qxl_display.c | 2 --
>  drivers/gpu/drm/radeon/radeon_display.c   | 2 --
>  drivers/gpu/drm/radeon/radeon_fb.c| 1 -
>  drivers/gpu/drm/tegra/fb.c| 1 -
>  drivers/gpu/drm/tiny/bochs.c  | 1 -
>  include/drm/drm_mode_config.h | 2 --
>  21 files changed, 8 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> index f4b5301ea2a0..09dec2561adf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> @@ -498,8 +498,6 @@ static int amdgpu_vkms_sw_init(void *handle)
>   adev_to_drm(adev)->mode_config.preferred_depth = 24;
>   adev_to_drm(adev)->mode_config.prefer_shadow = 1;
>  
> - adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> -
>   r = amdgpu_display_modeset_create_props(adev);
>   if (r)
>   return r;
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index 288fce7dc0ed..05051d5d2ec3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -2800,8 +2800,6 @@ static int dce_v10_0_sw_init(void *handle)
>  
>   adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
>  
> - adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> -
>   r = amdgpu_display_modeset_create_props(adev);
>   if (r)
>   return r;
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index cbe5250b31cb..c928bc9eb202 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -2918,8 +2918,6 @@ static int dce_v11_0_sw_init(void *handle)
>  
>   adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
>  
> - adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> -
>   r = amdgpu_display_modeset_create_props(adev);
>   if (r)
>   return r;
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index b1c44fab074f..62315fd5a05f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -2675,7 +2675,6 @@ static int dce_v6_0_sw_init(void *handle)
>   adev_to_drm(adev)->mode_config.preferred_depth = 24;
>   adev_to_drm(adev)->mode_config.prefer_shadow = 1;
>   adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
> - adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
>  
>   r = amdgpu_display_modeset_create_props(adev);
>   if (r)
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index a22b45c92792..87d5e4c21cb3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -2701,8 +2701,6 @@ static int dce_v8_0_sw_init(void *handle)
>  
>   adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
>  
> - adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
> -
>   r = amdgpu_display_modeset_create_props(adev);
>   if (r)
>   return r;
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index c053cb79cd06..0db2a88cd4d7 100644
> --- a/drivers/gpu/drm/amd/display/amdg

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

2022-10-18 Thread Christian König

Am 18.10.22 um 15:17 schrieb Zack Rusin:

From: Zack Rusin 

The fb_base in struct drm_mode_config has been unused for a long time.
Some drivers set it and some don't leading to a very confusing state
where the variable can't be relied upon, because there's no indication
as to which driver sets it and which doesn't.

The only usage of fb_base is internal to two drivers so instead of trying
to force it into all the drivers to get it into a coherent state
completely remove it.

Signed-off-by: Zack Rusin 


Since that address is completely driver specific to begin with it 
doesn't make to much sense to keep it int a common structure anyway.


Acked-by: Christian König 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c  | 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 -
  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 --
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
  drivers/gpu/drm/ast/ast_mode.c| 1 -
  drivers/gpu/drm/gma500/framebuffer.c  | 6 +++---
  drivers/gpu/drm/gma500/psb_drv.h  | 1 +
  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   | 1 -
  drivers/gpu/drm/mgag200/mgag200_mode.c| 1 -
  drivers/gpu/drm/msm/msm_fbdev.c   | 2 --
  drivers/gpu/drm/nouveau/nouveau_display.c | 1 -
  drivers/gpu/drm/nouveau/nv04_fbcon.c  | 6 --
  drivers/gpu/drm/omapdrm/omap_fbdev.c  | 2 --
  drivers/gpu/drm/qxl/qxl_display.c | 2 --
  drivers/gpu/drm/radeon/radeon_display.c   | 2 --
  drivers/gpu/drm/radeon/radeon_fb.c| 1 -
  drivers/gpu/drm/tegra/fb.c| 1 -
  drivers/gpu/drm/tiny/bochs.c  | 1 -
  include/drm/drm_mode_config.h | 2 --
  21 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index f4b5301ea2a0..09dec2561adf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -498,8 +498,6 @@ static int amdgpu_vkms_sw_init(void *handle)
adev_to_drm(adev)->mode_config.preferred_depth = 24;
adev_to_drm(adev)->mode_config.prefer_shadow = 1;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 288fce7dc0ed..05051d5d2ec3 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -2800,8 +2800,6 @@ static int dce_v10_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index cbe5250b31cb..c928bc9eb202 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -2918,8 +2918,6 @@ static int dce_v11_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index b1c44fab074f..62315fd5a05f 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -2675,7 +2675,6 @@ static int dce_v6_0_sw_init(void *handle)
adev_to_drm(adev)->mode_config.preferred_depth = 24;
adev_to_drm(adev)->mode_config.prefer_shadow = 1;
adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
-   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
  
  	r = amdgpu_display_modeset_create_props(adev);

if (r)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index a22b45c92792..87d5e4c21cb3 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -2701,8 +2701,6 @@ static int dce_v8_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c053cb79cd06..0db2a88cd4d7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgp

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

2022-10-18 Thread Thomas Zimmermann

Hi

Am 18.10.22 um 15:17 schrieb Zack Rusin:

From: Zack Rusin 

The fb_base in struct drm_mode_config has been unused for a long time.
Some drivers set it and some don't leading to a very confusing state
where the variable can't be relied upon, because there's no indication
as to which driver sets it and which doesn't.

The only usage of fb_base is internal to two drivers so instead of trying
to force it into all the drivers to get it into a coherent state
completely remove it.


Thanks a lot. I wanted to remove that field for some time. Pleaser see 
my comments below.




Signed-off-by: Zack Rusin 
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c  | 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 2 --
  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 -
  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 --
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
  drivers/gpu/drm/ast/ast_mode.c| 1 -
  drivers/gpu/drm/gma500/framebuffer.c  | 6 +++---
  drivers/gpu/drm/gma500/psb_drv.h  | 1 +
  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   | 1 -
  drivers/gpu/drm/mgag200/mgag200_mode.c| 1 -
  drivers/gpu/drm/msm/msm_fbdev.c   | 2 --
  drivers/gpu/drm/nouveau/nouveau_display.c | 1 -
  drivers/gpu/drm/nouveau/nv04_fbcon.c  | 6 --
  drivers/gpu/drm/omapdrm/omap_fbdev.c  | 2 --
  drivers/gpu/drm/qxl/qxl_display.c | 2 --
  drivers/gpu/drm/radeon/radeon_display.c   | 2 --
  drivers/gpu/drm/radeon/radeon_fb.c| 1 -
  drivers/gpu/drm/tegra/fb.c| 1 -
  drivers/gpu/drm/tiny/bochs.c  | 1 -
  include/drm/drm_mode_config.h | 2 --
  21 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index f4b5301ea2a0..09dec2561adf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -498,8 +498,6 @@ static int amdgpu_vkms_sw_init(void *handle)
adev_to_drm(adev)->mode_config.preferred_depth = 24;
adev_to_drm(adev)->mode_config.prefer_shadow = 1;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 288fce7dc0ed..05051d5d2ec3 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -2800,8 +2800,6 @@ static int dce_v10_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index cbe5250b31cb..c928bc9eb202 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -2918,8 +2918,6 @@ static int dce_v11_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index b1c44fab074f..62315fd5a05f 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -2675,7 +2675,6 @@ static int dce_v6_0_sw_init(void *handle)
adev_to_drm(adev)->mode_config.preferred_depth = 24;
adev_to_drm(adev)->mode_config.prefer_shadow = 1;
adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
-   adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
  
  	r = amdgpu_display_modeset_create_props(adev);

if (r)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c 
b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index a22b45c92792..87d5e4c21cb3 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -2701,8 +2701,6 @@ static int dce_v8_0_sw_init(void *handle)
  
  	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
  
-	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

-
r = amdgpu_display_modeset_create_props(adev);
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c053cb79cd06..0db2a88cd4d7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3816,8 +3816,6 @@ static int amdgpu_dm_mode_conf