From patchwork Mon Feb 10 18:34:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3621861 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE52FBF418 for ; Mon, 10 Feb 2014 18:34:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6F08201B6 for ; Mon, 10 Feb 2014 18:34:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2946A201E7 for ; Mon, 10 Feb 2014 18:34:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5910D105813; Mon, 10 Feb 2014 10:34:51 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by gabe.freedesktop.org (Postfix) with ESMTP id AE52310581C for ; Mon, 10 Feb 2014 10:34:47 -0800 (PST) Received: by mail-qc0-f176.google.com with SMTP id e16so11244058qcx.35 for ; Mon, 10 Feb 2014 10:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hmwaCKuh5BDh/ggMszcrKWTjV65RaaxFOVL5MtTWsZs=; b=LKlYYfm5u5UuLb7FR1N2xl43EMBCE4ZF1QthWqag0DT0PL+ow3eNy0ufiodWGltrGj PMmgdRwcf59REsDGYAg301Ue0SOu9A77hBDjAunJR/yFfrYO3tpB74gI3O2dcYZw+LZp XWD5PcqLHYXIT5yO6n8WxoKqIocMXvSKJ8RHzQVWUBKKqyPxgR09pIjgCLnSWogsO0d9 nXTIjNAIbJ8TMUfdHVLWyS6tnv32OKxH2+Qyh43wOhj2cBCvtEmJS3iBWWvXkPwN9Wmm bZ9vWtjaWSiyeArX4lARe1tos4hhmfEVUzw3i3ISk2fivZ53ehbKaYWs8k17oRnRL6eb qlFQ== X-Received: by 10.224.40.130 with SMTP id k2mr49944582qae.91.1392057287093; Mon, 10 Feb 2014 10:34:47 -0800 (PST) Received: from localhost (pool-108-20-254-237.bstnma.east.verizon.net. [108.20.254.237]) by mx.google.com with ESMTPSA id s2sm45103263qat.1.2014.02.10.10.34.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2014 10:34:46 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCHv2 4/4] pipe-loader: add pipe loader for freedreno/msm Date: Mon, 10 Feb 2014 13:34:21 -0500 Message-Id: <1392057261-25942-5-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392057261-25942-1-git-send-email-robdclark@gmail.com> References: <1392057261-25942-1-git-send-email-robdclark@gmail.com> Cc: Emil Velikov , Rob Clark X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/targets/pipe-loader/Makefile.am | 16 ++++++++++++++++ src/gallium/targets/pipe-loader/pipe_msm.c | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/gallium/targets/pipe-loader/pipe_msm.c diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 97733c1..8a0f254 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -132,6 +132,22 @@ pipe_radeonsi_la_LDFLAGS += $(LLVM_LDFLAGS) endif endif +if HAVE_GALLIUM_FREEDRENO +pipe_LTLIBRARIES += pipe_msm.la +pipe_msm_la_SOURCES = pipe_msm.c +nodist_EXTRA_pipe_msm_la_SOURCES = dummy.cpp +pipe_msm_la_LIBADD = \ + $(PIPE_LIBS) \ + $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \ + $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \ + $(LIBDRM_LIBS) +pipe_msm_la_LDFLAGS = -no-undefined -avoid-version -module +if HAVE_MESA_LLVM +pipe_msm_la_LIBADD += $(LLVM_LIBS) +pipe_msm_la_LDFLAGS += $(LLVM_LDFLAGS) +endif +endif + if HAVE_GALLIUM_SVGA pipe_LTLIBRARIES += pipe_vmwgfx.la pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c diff --git a/src/gallium/targets/pipe-loader/pipe_msm.c b/src/gallium/targets/pipe-loader/pipe_msm.c new file mode 100644 index 0000000..76e4023 --- /dev/null +++ b/src/gallium/targets/pipe-loader/pipe_msm.c @@ -0,0 +1,21 @@ + +#include "target-helpers/inline_debug_helper.h" +#include "state_tracker/drm_driver.h" +#include "freedreno/drm/freedreno_drm_public.h" + +static struct pipe_screen * +create_screen(int fd) +{ + struct pipe_screen *screen; + + screen = fd_drm_screen_create(fd); + if (!screen) + return NULL; + + screen = debug_screen_wrap(screen); + + return screen; +} + +PUBLIC +DRM_DRIVER_DESCRIPTOR("msm", "freedreno", create_screen, NULL)