[PATCH v2 08/40] drm: Add a simple prime number generator

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 16 10:25:27 UTC 2016


On Fri, Dec 16, 2016 at 11:08:10AM +0100, Lukas Wunner wrote:
> On Fri, Dec 16, 2016 at 09:43:54AM +0000, Chris Wilson wrote:
> > On Fri, Dec 16, 2016 at 10:31:17AM +0100, Lukas Wunner wrote:
> > > On Fri, Dec 16, 2016 at 07:46:46AM +0000, Chris Wilson wrote:
> > > > Prime numbers are interesting for testing components that use multiplies
> > > > and divides, such as testing struct drm_mm alignment computations.
> > > > 
> > > > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > > > ---
> > > >  drivers/gpu/drm/Kconfig                 |   4 +
> > > >  drivers/gpu/drm/Makefile                |   1 +
> > > >  drivers/gpu/drm/lib/drm_prime_numbers.c | 175 ++++++++++++++++++++++++++++++++
> > > >  drivers/gpu/drm/lib/drm_prime_numbers.h |  10 ++
> > > >  4 files changed, 190 insertions(+)
> > > >  create mode 100644 drivers/gpu/drm/lib/drm_prime_numbers.c
> > > >  create mode 100644 drivers/gpu/drm/lib/drm_prime_numbers.h
> > > 
> > > Hm, why not put this in lib/ ?  Don't see anything DRM-specific here
> > > at first glance and this might be useful to others.  Or others might
> > > come up with improvements and they'll be more likely to discover it
> > > outside of DRM.
> > 
> > Because that is a 3+ month cycle before I can then apply the testcases,
> > and without the testscases do you want the bugfixes?
> 
> Do patches for lib/ have to go through a different tree?
> Don't think so, I've seen e.g. changes to lib/ucs2_string.c
> go through the EFI tree.  It seems to me lib/ is sort of
> free for all.

Hmm, I was expecting to shepherd them through say Andrew Morton.
lib/random32.c is maintained by David Miller, so definitely would like
to present a simple set of pre-reviewed patches.

But it looks like we could create lib/prime_numbers.c without too much
consternation.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list