[igt-dev] [PATCH i-g-t] lib: Don't use libdrm_nouveau if not found

Petri Latvala petri.latvala at intel.com
Tue Mar 30 04:05:23 UTC 2021


On Mon, Mar 29, 2021 at 12:25:22PM -0400, Lyude Paul wrote:
> whoops - nice catch with this one:
> 
> Reviewed-by: Lyude Paul <lyude at redhat.com>


Thanks, merged.

For the record, the build-test in .gitlab-ci.yml for this didn't catch
it, because the situation there is that libdrm_nouveau is installed
but unused, the build error happens when libdrm_nouveau is completely
missing. Arek said he'll look into finetuning the minimal-setup build
tests.


-- 
Petri Latvala


> 
> On Mon, 2021-03-29 at 17:07 +0300, Petri Latvala wrote:
> > Only #include the libdrm_nouveau headers if HAVE_LIBDRM_NOUVEAU is set
> > so IGT builds again without it installed.
> > 
> > Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> > Cc: Lyude Paul <lyude at redhat.com>
> > ---
> >  lib/igt_nouveau.h | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/lib/igt_nouveau.h b/lib/igt_nouveau.h
> > index ea44adb2..c518de3c 100644
> > --- a/lib/igt_nouveau.h
> > +++ b/lib/igt_nouveau.h
> > @@ -26,10 +26,6 @@
> >  #include <stddef.h>
> >  #include <inttypes.h>
> >  
> > -#include <nouveau/nouveau.h>
> > -#include <nouveau/nvif/class.h>
> > -#include <nouveau/nvif/cl0080.h>
> > -
> >  #include "igt_core.h"
> >  
> >  #define IGT_NOUVEAU_CHIPSET_GV100 0x140
> > @@ -37,6 +33,10 @@
> >  typedef struct igt_fb igt_fb_t;
> >  
> >  #ifdef HAVE_LIBDRM_NOUVEAU
> > +#include <nouveau/nouveau.h>
> > +#include <nouveau/nvif/class.h>
> > +#include <nouveau/nvif/cl0080.h>
> > +
> >  #define DECL(d) d
> >  #else
> >  /* There shouldn't be any code that calls igt_nouveau_* functions without
> > libdrm support enabled, as
> 
> -- 
> Sincerely,
>    Lyude Paul (she/her)
>    Software Engineer at Red Hat
>    
> Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've
> asked me a question, are waiting for a review/merge on a patch, etc. and I
> haven't responded in a while, please feel free to send me another email to check
> on my status. I don't bite!
> 


More information about the igt-dev mailing list