[PATCH 4/8] xfree86: Hide some pre-randr mode validation details

Aaron Plattner aplattner at nvidia.com
Mon Jun 8 17:55:26 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/02/2015 11:15 AM, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>

I'm happy to say that we don't use any of these, so
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

- -- Aaron

> --- hw/xfree86/common/xf86.h     | 11 ------- 
> hw/xfree86/common/xf86Mode.c | 11 +++---- 
> hw/xfree86/doc/ddxDesign.xml | 75
> -------------------------------------------- 3 files changed, 5
> insertions(+), 92 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h 
> index 49ff35b..1cde478 100644 --- a/hw/xfree86/common/xf86.h +++
> b/hw/xfree86/common/xf86.h @@ -368,22 +368,11 @@
> xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
> 
> /* xf86Mode.c */
> 
> -extern _X_EXPORT int -xf86GetNearestClock(ScrnInfoPtr scrp, int
> freq, Bool allowDiv2, -                    int DivFactor, int
> MulFactor, int *divider); extern _X_EXPORT const char * 
> xf86ModeStatusToString(ModeStatus status); extern _X_EXPORT
> ModeStatus -xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, 
> -               ClockRangePtr clockRanges, LookupModeFlags
> strategy); -extern _X_EXPORT ModeStatus 
> xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); 
> extern _X_EXPORT ModeStatus 
> -xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr
> mode, -                              ClockRangePtr clockRanges, -
> LookupModeFlags strategy, -                              int
> maxPitch, int virtualX, int virtualY); -extern _X_EXPORT
> ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr
> mode, int flags); extern _X_EXPORT int 
> xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, diff
> --git a/hw/xfree86/common/xf86Mode.c
> b/hw/xfree86/common/xf86Mode.c index 9a5550f..3f446ae 100644 ---
> a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c 
> @@ -112,11 +112,10 @@ printModeRejectMessage(int index,
> DisplayModePtr p, int status) }
> 
> /* - * xf86GetNearestClock -- - *	Find closest clock to given
> frequency (in kHz).  This assumes the - *	number of clocks is
> greater than zero. + * Find closest clock to given frequency (in
> kHz).  This assumes the + * number of clocks is greater than zero. 
> */ -int +static int xf86GetNearestClock(ScrnInfoPtr scrp, int freq,
> Bool allowDiv2, int DivFactor, int MulFactor, int *divider) { @@
> -451,7 +450,7 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp, * reason. 
> */
> 
> -ModeStatus +static ModeStatus xf86LookupMode(ScrnInfoPtr scrp,
> DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags
> strategy) { @@ -845,7 +844,7 @@ xf86CheckModeSize(ScrnInfoPtr scrp,
> int w, int x, int y) *    maxVValue    maximum vertical timing
> value */
> 
> -ModeStatus +static ModeStatus 
> xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr
> mode, ClockRangePtr clockRanges, LookupModeFlags strategy, diff
> --git a/hw/xfree86/doc/ddxDesign.xml
> b/hw/xfree86/doc/ddxDesign.xml index 6a9de9e..aed77a9 100644 ---
> a/hw/xfree86/doc/ddxDesign.xml +++ b/hw/xfree86/doc/ddxDesign.xml 
> @@ -6957,28 +6957,6 @@ use of some of these secondary mode helper
> functions.
> 
> <blockquote><para> <programlisting> -    int
> xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, -
> int *divider); -	  </programlisting> -	  <blockquote><para> -
> This function returns the index of the closest clock to the -
> frequency <parameter>freq</parameter> given (in kHz).  It assumes
> that -      the number of clocks is greater than zero.  It requires
> that the -      <structfield>numClocks</structfield> and
> <structfield>clock</structfield> fields of the -
> <structname>ScrnInfoRec</structname> are initialised.  The -
> <structfield>allowDiv2</structfield> field determines if the clocks
> can be -      halved.  The <parameter>*divider</parameter> return
> value indicates -      whether clock division is used when
> determining the clock returned. -	    </para> - -	    <para> -
> This function is only for non-programmable clocks. -	    </para> - 
> -	  </blockquote></para></blockquote> - -      <blockquote><para> -
> <programlisting> const char *xf86ModeStatusToString(ModeStatus
> status); </programlisting> <blockquote><para> @@ -6990,59 +6968,6
> @@ use of some of these secondary mode helper functions.
> 
> <blockquote><para> <programlisting> -    ModeStatus
> xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, -
> ClockRangePtr clockRanges, LookupModeFlags strategy); -
> </programlisting> -	  <blockquote><para> -      This function takes
> a pointer to a mode with the name filled in, -      and looks for a
> mode in the <structfield>modePool</structfield> list which -
> matches.  The parameters of the matching mode are filled in to -
> <parameter>*modep</parameter>.  The
> <parameter>clockRanges</parameter> and -
> <parameter>strategy</parameter> parameters are as for the -
> <function>xf86ValidateModes()</function> function above. -
> </para> - -	    <para> -      This function requires the
> <structfield>modePool</structfield>, -
> <structfield>clock[]</structfield>,
> <structfield>numClocks</structfield> and -
> <structfield>progClock</structfield> fields of the
> <structname>ScrnInfoRec</structname> -      to be initialised
> before being called. -	    </para> - -	    <para> -      The return
> value is <constant>MODE_OK</constant> if a mode was found. -
> Otherwise it indicates why a matching mode could not be found. -
> </para> - -	  </blockquote></para></blockquote> - -
> <blockquote><para> -	  <programlisting> -    ModeStatus
> xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, -
> DisplayModePtr mode, ClockRangePtr clockRanges, -
> LookupModeFlags strategy, int maxPitch, -
> int virtualX, int virtualY); -	  </programlisting> -
> <blockquote><para> -      This function checks the passed mode
> against some basic driver -      constraints.  Apart from the ones
> passed explicitly, the -      <structfield>maxHValue</structfield>
> and <structfield>maxVValue</structfield> fields of -      the
> <structname>ScrnInfoRec</structname> are also used.  If the -
> <structfield>ValidMode</structfield> field of the
> <structname>ScrnInfoRec</structname> -      is set, that function
> is also called to check the mode.  Next, the -      mode is checked
> against the monitor's constraints. -	    </para> - -	    <para> -
> If the mode is consistent with all constraints, the return value -
> is <constant>MODE_OK</constant>.  Otherwise the return value
> indicates -      which constraint wasn't met. -	    </para> - -
> </blockquote></para></blockquote> - -      <blockquote><para> -
> <programlisting> void xf86DeleteMode(DisplayModePtr *modeList,
> DisplayModePtr mode); </programlisting> <blockquote><para>
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVdjl+AAoJEBvvPYQBpohhIoAP/3E59mJMeHXknIjOiOdosKSa
TARzrpVEQ/MtaCKiJHMoIP2gli6CcwE7+F9IPwYlwdPTxc8Jcr50yRizg754K4wK
BaMUVrF5PWAKLf3IOyxi0YYYoWUOTkzbQmyd3KEFNBj5xXWaq7GVkinePRIVzKP5
eDVSXkcOhVDQNlN9vhpFECrMYECyJ49RvqkEb5SRwXfHIvS2kwyoczvfzogO53Ma
c4Fztq+04Z1Gf9zDAu6bjrWDtEjS+EpG6NRRKvFQjUkColuDQFtyB3CY6adgJrLC
CAwuSBDZsWg5nEcQLTzHDifIj8tfau5vubEhd6XV8+lzMah+UHAc+hPl3nYGCDJ9
aggHfrOQegR5ORraugcEIHQemd8udvGk/4BYDwLkudO/YoghYF1S2ulqCYpXMsgJ
W8xbtqy/iZAFm3uwsdeDuC6+VcRhFBhrdHqdMPmZIgj+IDbPaH54+fP4pTlx1mRh
dO5kDHm1880N+J7w1TDlwGo8jZVuKML2zq9IKxaokdhKciqpxziAEc3+g+eK9U1Z
alNT5iiewDsEEhWLwGNzwHCla0JKD+ultY07gVD0Amgej+LrT9FyaRnL+09A4ALj
0WBJJXpxJtEHF7vm+JfZuqcYiRdHhA+QsN5cuDpS7N8Gj7ORMnCvfr9CHincI4SZ
Y+JnJB/bxUiKSMn8qU/R
=LOBQ
-----END PGP SIGNATURE-----

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the xorg-devel mailing list