All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Christophe Fergeau <cfergeau@redhat.com>
Cc: spice-devel@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, airlied@redhat.com
Subject: Re: [drm/qxl v2 7/7] qxl: Allow resolution which are not multiple of 8
Date: Thu, 03 Nov 2016 18:08:39 +0100	[thread overview]
Message-ID: <1478192919.17235.10.camel@redhat.com> (raw)
In-Reply-To: <20161103114124.dnwdx2aacdh72uek@edamame.cdg.redhat.com>

On Do, 2016-11-03 at 12:41 +0100, Christophe Fergeau wrote:
> On Thu, Nov 03, 2016 at 09:53:48AM +0100, Gerd Hoffmann wrote:
> > On Mi, 2016-11-02 at 18:00 +0100, Christophe Fergeau wrote:
> > > The use of drm_cvt_mode() in qxl_add_monitors_config_modes() means that
> > > the resolutions we are going to present to user-space are going to be
> > > rounded down to a multiple of 8. In the QXL arbitrary resolution case,
> > > this is not useful.
> > > This commit forces the actual width/height that was requested by the
> > > client in the drm_display_mode structure rather than keeping the
> > > rounded version.
> > 
> > Hmm, not sure this is a good idea.  There are probably reasons why
> > drm_cvt_mode is rounding down ...
> 
> Yeah, I'm sure there are reasons, but I don't know what they are.
> drm_cvt_mode seems to be calculating various frequencies and timings
> related to refreshing real world monitors, and this seems to be defined
> by some VESA standard. Maybe the rounding down is because the real-world
> monitors or VESA require it.

No worries here, we are in the virtual world, it for sure wouldn't break
monitors ;)

> Or maybe other parts of the
> kernel/userspace rely on this rounding down.

This is where I suspect we could run in trouble.  Odd resolutions simply
don't happen on physical hardware, all usual resolutions are a multiple
of 8, most of them are even a multiple of 16.

Various image/video formats use 16x16 blocks.
The qemu vnc server operates on 16x16 blocks too (and we had bugs in the
past with odd resolutions).

Also scanlines and cachelines align nicely if you don't use odd
resolutions.

> I unfortunately don't know
> :(

I don't have definitive answers too, just a gut feeling that this might
cause trouble.

Maybe we should add a module option for this?  So there is an easy
(as-in: doesn't require a kernel rebuild) way out in case it causes
trouble in certain setups?

cheers,
  Gerd

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

  reply	other threads:[~2016-11-03 17:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 17:00 [drm/qxl v2 0/7] qxl: Various cleanups/fixes Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 1/7] qxl: Mark some internal functions as static Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 2/7] qxl: Remove unused prototype Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 3/7] qxl: Add missing '\n' to qxl_io_log() call Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 4/7] qxl: Call qxl_gem_{init,fini} Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 5/7] qxl: Remove qxl_bo_init() return value Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 6/7] qxl: Don't notify userspace when monitors config is unchanged Christophe Fergeau
2016-11-02 17:00 ` [drm/qxl v2 7/7] qxl: Allow resolution which are not multiple of 8 Christophe Fergeau
2016-11-03  8:53   ` Gerd Hoffmann
2016-11-03 11:41     ` Christophe Fergeau
2016-11-03 17:08       ` Gerd Hoffmann [this message]
2016-11-04 10:41         ` Christophe Fergeau
2016-11-07  7:22           ` Dave Airlie
2016-11-07  8:18             ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478192919.17235.10.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@redhat.com \
    --cc=cfergeau@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=spice-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.