Bug 14415 - Wrong DPI informations with radeonhd
Summary: Wrong DPI informations with radeonhd
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/radeonhd (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Luc Verhaegen
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 12:28 UTC by Patrick Matthäi
Modified: 2008-03-27 11:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Correct size. (221.41 KB, image/png)
2008-02-09 09:19 UTC, Patrick Matthäi
no flags Details
With radeonhd. (217.01 KB, image/png)
2008-02-09 09:19 UTC, Patrick Matthäi
no flags Details
Xorg log from radeonhd (35.59 KB, application/octet-stream)
2008-02-09 09:23 UTC, Patrick Matthäi
no flags Details
My xorg.conf for radeonhd. (1.55 KB, application/octet-stream)
2008-02-09 09:26 UTC, Patrick Matthäi
no flags Details

Description Patrick Matthäi 2008-02-07 12:28:03 UTC
Hello,

I'm using an mobile X1250 Pro card in my HP compaq 6715s notebook.

With fglrx, I get the following dpi informations:
resolution:    97x95 dots per inch

Which seems well sized and correct.

With radeonhd I get at default 98x98 (with and without the ddc module). The fonts seems to be clear but at many places they are just oversized.

I tried to override the value with forcedpi, but there I can just set a value for the X and Y parameter at the same time, so that this isn't any choice for me.

After I've modified an little part of the sourcecode in src/rhd_driver.c I get (maybe before, too) at my Xorg log, that it has detect 96 dpi as standard, but it still uses 98 dpi.

Here are my sensless changes:

        /* make sure that we have at least some value */
/*      if (!pScrn->xDpi || !pScrn->yDpi) {
            if (pScrn->xDpi)
                pScrn->yDpi = pScrn->xDpi;
            else if (pScrn->yDpi)
                pScrn->xDpi = pScrn->xDpi;
            else {
                pScrn->xDpi = 96;
                pScrn->yDpi = 96;
            }
        }*/
        /* Modifications by me */
        pScrn->xDpi = 97;
        pScrn->yDpi = 95;

    }

#ifndef MMPERINCH
#define MMPERINCH 25.4
Comment 1 Egbert Eich 2008-02-09 09:08:04 UTC
The difference between 97x95 and 98x98 dpi is minimal. DPI is only used to give you an approximately identical sensation between a paper printout and what you see on the screen provided you are viewing it under the same viewing distance.
Could it be that the impression of 'oversized' only exists only because you are used to the smaller size?
So this is a very subjective thing.
I also wonder why the size is significantly different: the difference is only 3 percent. You'd need a 33 pixel high font to get one pixel more in hight.
You may also want to use the command line option -dpi to set your resolution to the value you desire.
Comment 2 Patrick Matthäi 2008-02-09 09:10:41 UTC
If this would be right (and I trust you), then it could be another issue why are they oversized.

I will create in the next hour some fglrx <-> radeonhd screenshots, so that you could see what I mean. :)
Comment 3 Patrick Matthäi 2008-02-09 09:19:14 UTC
Created attachment 14238 [details]
Correct size.
Comment 4 Patrick Matthäi 2008-02-09 09:19:42 UTC
Created attachment 14239 [details]
With radeonhd.
Comment 5 Patrick Matthäi 2008-02-09 09:23:24 UTC
Created attachment 14240 [details]
Xorg log from radeonhd
Comment 6 Patrick Matthäi 2008-02-09 09:26:53 UTC
Created attachment 14241 [details]
My xorg.conf for radeonhd.
Comment 7 Egbert Eich 2008-02-09 09:56:05 UTC
OK, I see what you mean here. It seems mostly affect the fonts on the side bar here. 
Font renderers need to do some rounding to make a character fit into a raster. It could be that the difference in DPI just caused the renderer to jump form one integer to the next when doing rounding.
At resolutions of around 100 dpi the size of fonts is still an approximation. Pretty much what you got 15 years ago on dot matrix printers. So what you see here is quite conceivable. 
I'm unable to decide which font size looks 'right'. 
I furthermore would think that the difference in DPI between radeonhd and fglrx is due to different rounding inside the drivers. If we changed that now to suit your needs it is conceivable that another person will come around and complain that the the font size has changed for him.

What surprises me here: the log file you've attached now says 96x96 dpi.
Could you please use xdpyinfo to obtain the resolution a client would see?
Comment 8 Patrick Matthäi 2008-02-10 11:26:30 UTC
That's right. Maybe it's just for me the right one of fglrx.
Sorry I thought I've written it to this report. The log always says me, that it has been setted to 96x96 dpi without any issue or something like that. xdpyinfo always reports 98x98 to me. All over there the same result if I try to force the dpi with the little code above or with the forcedpi option.
Comment 9 Egbert Eich 2008-03-27 10:23:03 UTC
Since it is an issue of different rounding and the difference is really debatable I will close this with NOTABUG.
Comment 10 Chris Bandy 2008-03-27 11:57:38 UTC
I tend to agree with Egbert that the difference is negligible, however I disagree that it is simply a rounding error. Looking at his log, the driver clearly detects his screen size ("Max H-Image Size [cm]: horiz.: 33  vert.: 21" and also "Image Size:  331 x 207 mm") and a native resolution of 1280x800. A dpi of 96x96 does not sound correct either.

1280 px / 33 cm = 98.52 pixel per inch
 800 px / 21 cm = 96.76 pixel per inch

1280 px / 331 mm = 98.22 pixel per inch
 800 px / 207 mm = 98.16 pixel per inch


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.