[PATCH xserver 4/7] xfree86: Remove Option "BiosBase"

Aaron Plattner aplattner at nvidia.com
Tue Feb 14 21:39:30 UTC 2017


On 02/14/2017 12:30 PM, Adam Jackson wrote:
> Just no.
>
> The ddxDesign chunk removes the whole para about xf86FixPciResource,
> since it turns out that function doesn't exist at all anymore.
>
> i128 and mga do use this slot, but they oughtn't.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  hw/xfree86/common/xf86Config.c    |  1 -
>  hw/xfree86/common/xf86Configure.c |  1 -
>  hw/xfree86/common/xf86str.h       |  2 --
>  hw/xfree86/doc/ddxDesign.xml      | 29 -----------------------------
>  hw/xfree86/man/xorg.conf.man      |  6 ------
>  hw/xfree86/parser/Device.c        |  8 --------
>  hw/xfree86/parser/xf86Parser.h    |  1 -
>  hw/xfree86/parser/xf86tokens.h    |  1 -
>  8 files changed, 49 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
> index f03acf3..89861e0 100644
> --- a/hw/xfree86/common/xf86Config.c
> +++ b/hw/xfree86/common/xf86Config.c
> @@ -2105,7 +2105,6 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active, Bool g
>      devicep->driver = conf_device->dev_driver;
>      devicep->active = active;
>      devicep->videoRam = conf_device->dev_videoram;
> -    devicep->BiosBase = conf_device->dev_bios_base;
>      devicep->MemBase = conf_device->dev_mem_base;
>      devicep->IOBase = conf_device->dev_io_base;
>      devicep->clockchip = conf_device->dev_clockchip;
> diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
> index f975b98..668a551 100644
> --- a/hw/xfree86/common/xf86Configure.c
> +++ b/hw/xfree86/common/xf86Configure.c
> @@ -268,7 +268,6 @@ configureDeviceSection(int screennum)
>      for (i = 0; i < MAXDACSPEEDS; i++)
>          ptr->dev_dacSpeeds[i] = DevToConfig[screennum].GDev.dacSpeeds[i];
>      ptr->dev_videoram = DevToConfig[screennum].GDev.videoRam;
> -    ptr->dev_bios_base = DevToConfig[screennum].GDev.BiosBase;
>      ptr->dev_mem_base = DevToConfig[screennum].GDev.MemBase;
>      ptr->dev_io_base = DevToConfig[screennum].GDev.IOBase;
>      ptr->dev_clockchip = DevToConfig[screennum].GDev.clockchip;
> diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
> index 4df10a5..b060575 100644
> --- a/hw/xfree86/common/xf86str.h
> +++ b/hw/xfree86/common/xf86str.h
> @@ -303,7 +303,6 @@ typedef struct {
>      Bool active;
>      Bool inUse;
>      int videoRam;
> -    unsigned long BiosBase;     /* Base address of video BIOS */
>      unsigned long MemBase;      /* Frame buffer base address */
>      unsigned long IOBase;
>      int chipID;
> @@ -648,7 +647,6 @@ typedef struct _ScrnInfoRec {
>      int numClocks;              /* number of clocks */
>      int clock[MAXCLOCKS];       /* list of clock frequencies */
>      int videoRam;               /* amount of video ram (kb) */
> -    unsigned long biosBase;     /* Base address of video BIOS */
>      unsigned long memPhysBase;  /* Physical address of FB */
>      unsigned long fbOffset;     /* Offset of FB in the above */
>      int memClk;                 /* memory clock */
> diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
> index df5f64b..0a14139 100644
> --- a/hw/xfree86/doc/ddxDesign.xml
> +++ b/hw/xfree86/doc/ddxDesign.xml
> @@ -1208,7 +1208,6 @@ Here is what <function>InitOutput()</function> does:
>            numClocks             (if not programmable)
>            clock[]               (if not programmable)
>            videoRam
> -          biosBase
>            memBase
>            memClk
>            driverPrivate
> @@ -2920,34 +2919,6 @@ Two functions are provided to obtain a resource range of a given type:
>  	</para>
>
>  	<para>
> -Some PCI devices are broken in the sense that they return invalid size
> -information for a certain resource.  In this case the driver can supply
> -the correct size and make sure that the resource range allocated for
> -the card is large enough to hold the address range decoded by the card.
> -The function <function>xf86FixPciResource()</function> can be used to do this:
> -	  <blockquote><para>
> -	      <programlisting>
> -    Bool xf86FixPciResource(int entityIndex, unsigned int prt,
> -                            CARD32 alignment, long type);
> -	      </programlisting>
> -	      <blockquote><para>
> -      This function fixes a PCI resource allocation.  The
> -      <parameter>prt</parameter> parameter contains the number of the PCI base
> -      register that needs to be fixed (<constant>0-5</constant>, and
> -      <constant>6</constant> for the BIOS base register).  The size is
> -      specified by the alignment.  Since PCI resources need to span an
> -      integral range of size <literal remap="tt">2ˆn</literal>, the alignm      ent also
> -      specifies the number of addresses that will be decoded.  If the
> -      driver specifies a type mask it can override the default type for
> -      PCI resources which is <constant>ResShared</constant>.  The resource
> -      broker needs to know that to find a matching resource range.  This
> -      function should be called before calling
> -      <function>xf86RegisterResources()</function>.  The return value is
> -      <constant>TRUE</constant> when the function succeeds.
> -		</para>
> -
> -	      </blockquote></para></blockquote>
> -
>  	  <blockquote><para>
>  	      <programlisting>
>      Bool xf86CheckPciMemBase(pciVideoPtr pPci, memType base);
> diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
> index 00ebf56..25af3aa 100644
> --- a/hw/xfree86/man/xorg.conf.man
> +++ b/hw/xfree86/man/xorg.conf.man
> @@ -1470,12 +1470,6 @@ In most cases this is not required because the Xorg server probes
>  the graphics board to determine this quantity.
>  The driver-specific documentation should indicate when it might be needed.
>  .TP 7
> -.BI "BiosBase  " "baseaddress"
> -This optional entry specifies the base address of the video BIOS for
> -the VGA board.
> -This address is normally auto-detected, and should only be specified if the
> -driver-specific documentation recommends it.
> -.TP 7
>  .BI "MemBase  " "baseaddress"
>  This optional entry specifies the memory base address of a graphics
>  board's linear frame buffer.
> diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c
> index 353d48c..c3f02a2 100644
> --- a/hw/xfree86/parser/Device.c
> +++ b/hw/xfree86/parser/Device.c
> @@ -73,7 +73,6 @@ static const xf86ConfigSymTabRec DeviceTab[] = {
>      {MATCHSEAT, "matchseat"},
>      {OPTION, "option"},
>      {VIDEORAM, "videoram"},
> -    {BIOSBASE, "biosbase"},
>      {MEMBASE, "membase"},
>      {IOBASE, "iobase"},
>      {CLOCKCHIP, "clockchip"},
> @@ -169,11 +168,6 @@ xf86parseDeviceSection(void)
>                  Error(NUMBER_MSG, "VideoRam");
>              ptr->dev_videoram = xf86_lex_val.num;
>              break;
> -        case BIOSBASE:
> -            if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
> -                Error(NUMBER_MSG, "BIOSBase");
> -            ptr->dev_bios_base = xf86_lex_val.num;
> -            break;
>          case MEMBASE:
>              if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
>                  Error(NUMBER_MSG, "MemBase");
> @@ -285,8 +279,6 @@ xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr)
>          }
>          if (ptr->dev_videoram)
>              fprintf(cf, "\tVideoRam    %d\n", ptr->dev_videoram);
> -        if (ptr->dev_bios_base)
> -            fprintf(cf, "\tBiosBase    0x%lx\n", ptr->dev_bios_base);
>          if (ptr->dev_mem_base)
>              fprintf(cf, "\tMemBase     0x%lx\n", ptr->dev_mem_base);
>          if (ptr->dev_io_base)
> diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
> index e014048..6762edb 100644
> --- a/hw/xfree86/parser/xf86Parser.h
> +++ b/hw/xfree86/parser/xf86Parser.h
> @@ -211,7 +211,6 @@ typedef struct {
>      const char *dev_ramdac;
>      int dev_dacSpeeds[CONF_MAXDACSPEEDS];
>      int dev_videoram;
> -    unsigned long dev_bios_base;
>      unsigned long dev_mem_base;
>      unsigned long dev_io_base;
>      const char *dev_clockchip;
> diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
> index 15792c6..4aa17a7 100644
> --- a/hw/xfree86/parser/xf86tokens.h
> +++ b/hw/xfree86/parser/xf86tokens.h
> @@ -181,7 +181,6 @@ typedef enum {
>      IOBASE,
>      RAMDAC,
>      DACSPEED,
> -    BIOSBASE,

I really hope no configurations are actually using this keyword, but if 
they are, this will break them. Fine with me, as long as that's intentional.

>      MEMBASE,
>      CLOCKCHIP,
>      CHIPID,
>


More information about the xorg-devel mailing list