[MPlayer-dev-eng] [PATCH] CPU detection related

Zuxy zuxy.meng at gmail.com
Sun Oct 16 14:43:27 CEST 2005


2005/10/16, Vladimir Mosgalin <mosgalin at vm10124.spb.edu>:
> Hi Zuxy!
>
> Though I'm not a developer, I have some suggestions:
> 1) You'd better send text files with LF endings. People around here
>    don't like text files in dos format ;)

I really don't think so....CRLF isn't that bad, is it?
> 2) WTF is "main.new\cpudetect.c"?? GNU patch (2.5.4) doesn't understand
>    stuff like this, I had to convert them to "/" manually. I strongly
>    suggest you to resend patch with correct dir separators.

Just conventinal. I'm using mplayer under win32 and I'm developing
under mingw32.

> 3) You misunderstood the idea about splitting a patch to several small
>    ones. You shouldn't make a separate patch for every file you modify;
>    patch cpudetect.c.diff will break compilation if applied without
>    cpudetect.h.diff - what's the point in splitting them then? It's
>    confusing..

I'm sorry about this....
> 4) Why don't you add a codename of my sempron processor too? ;)
> processor       : 0
> vendor_id       : AuthenticAMD
> cpu family      : 15
> model           : 44
> model name      : AMD Sempron(tm) Processor 2800+
> stepping        : 2
> cpu MHz         : 2663.728
> cache size      : 256 KB
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 1
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
> bogomips        : 5275.64
>
>
> Right now without your patch mplayer detects it as
> CPU: Advanced Micro Devices  (Family: 15, Stepping: 2)
> With your patch, it's
> CPU: AMD Sempron(tm) Processor 2800+ (Family: F, Model: 2C, Stepping: 2)
>
> Its codename is Paris, if I'm not mistaken.
>
I've explained that in another thread, maintaining model->codename
mapping is hell. I've dropped that. And from your reply I can see that
even /proc/cpuinfo has dropped that either.

You case isn't that simple. When looking for codename mplayer didn't
care extended model (2 for your cpu), so it indexed into cputable with
family 0xf and model 0xc, and what would it get? It would be "Athlon
64 Newcastle" which has model 0xc (not 0x2c). I'm much against this
because two cpus with totally different models are treated alike,
really confusing and may be misleading.

Take a look at last line for AMD cpu (model 0xf) you'll know why I
prefer namestring:-)BTW that line is far from complete since I didn't
incorporate codenames for Opterons with model 0xf, and Semprons too,
perhaps.

Anyway if you prefer the old way you can just apply the first patch
and discard the other two (should have been the other one:-)), and
update cputable.h yourself and send it to the team. New codenames are
always welcome; I just won't do it myself.

--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the MPlayer-dev-eng mailing list