lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly
> 
> On Thu, Dec 06, 2018 at 07:53:10AM -0500, Frediano Ziglio wrote:
> > >
> > > On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote:
> > > > >
> > > > > Just use qxl_num_crtc directly everywhere instead of using
> > > > > qdev->monitors_config->max_allowed. Drops pointless indirection
> > > > > and also is less confusing.
> > > > >
> > > >
> > > > To me is MORE confusing, why comparing number of something with
> > > > another number? Previously code was comparing number of monitors
> > > > with number of monitors, not number of CRTs with number of
> > > > monitors.
> > >
> > > Yes, spice/qxl and drm/kms use slightly different terminology.
> > >
> > > drm crtc == qxl monitor.
> > > drm framebuffer == qxl surface.
> > >
> > > You need to know that anyway when looking at the qxl ksm code. We
> > > have function names like qxl_crtc_update_monitors_config(). I fail
> > > to see why that is a problem ...
> > >
> > > cheers,
> > > Gerd
> >
> > I don't see any problem too but you are explaining to me
> > why your rationale "and also is less confusing" does not
> > stand.
>
> Well, it's less confusing because it takes away an indirection (not
> because of the naming).
>

It does not confuse me.

> qdev->monitors_config->max_allowed is effectively set by a module
> parameter. So using the module parameter variable qxl_num_crtc
> directly is better IMO. The kernel doesn't need to dereference pointers
> each time it needs the value, and when reading the code you don't have
> to trace where and why qdev->monitors_config->max_allowed is set.
>

That should go to the commit message!
With that the patch is fine for me.

Maybe there's no much point on reusing the same structure used
inside QXLRom/QXLRam but this is OT for this patch.

> cheers,
> Gerd
>
>

Frediano

\
 
 \ /
  Last update: 2018-12-06 15:10    [W:0.042 / U:16.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site