public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Jianxin Xiong <jianxin.xiong@intel.com>
Cc: linux-rdma@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leon@kernel.org>,
	liweihang <liweihang@huawei.com>
Subject: Re: [PATCH rdma-core] configure: Check the existence of all needed DRM headers
Date: Thu, 25 Mar 2021 10:20:26 -0300	[thread overview]
Message-ID: <20210325132026.GJ2710221@ziepe.ca> (raw)
In-Reply-To: <1616444421-148423-1-git-send-email-jianxin.xiong@intel.com>

On Mon, Mar 22, 2021 at 01:20:21PM -0700, Jianxin Xiong wrote:
> Some vendor specific DRM headers may be missing on systems with old
> kernels. Make sure that all headers needed by pyverbs/dmabuf_alloc.c
> are present before enabling that module.
> 
> Remove unused reference of "radeon_drm.h" from pyverbs/dmabuf_alloc.c.
> 
> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
>  CMakeLists.txt         | 6 +++++-
>  pyverbs/dmabuf_alloc.c | 1 -
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index e9a2f49..1208ab6 100644
> +++ b/CMakeLists.txt
> @@ -526,7 +526,11 @@ if (NOT DRM_INCLUDE_DIRS)
>  endif()
>  
>  if (DRM_INCLUDE_DIRS)
> -  include_directories(${DRM_INCLUDE_DIRS})
> +  if (EXISTS ${DRM_INCLUDE_DIRS}/i915_drm.h AND EXISTS ${DRM_INCLUDE_DIRS}/amdgpu_drm.h)
> +    include_directories(${DRM_INCLUDE_DIRS})

It should be in a compile test not coded like this.

The whole thing is getting complex, it should probably go into a
find_package() subroutine

Jason

      parent reply	other threads:[~2021-03-25 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 20:20 [PATCH rdma-core] configure: Check the existence of all needed DRM headers Jianxin Xiong
2021-03-23  2:09 ` liweihang
2021-03-25 13:20 ` Jason Gunthorpe [this message]

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=20210325132026.GJ2710221@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=jianxin.xiong@intel.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=liweihang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox