Message ID | 20191010120000.1421-4-jjhiblot@ti.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2181576ill; Thu, 10 Oct 2019 05:00:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/LDSXhFPFmt/rFQkShab72PrO2H/aTC/iE1brE4ROBgkKzUkDPStJnxGw1L3KW9IMSN6m X-Received: by 2002:a62:5ec6:: with SMTP id s189mr10020104pfb.169.1570708817701; Thu, 10 Oct 2019 05:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570708817; cv=none; d=google.com; s=arc-20160816; b=NyIpS1rTiNWhs3Kb76SuW5xD61LUVbHqXwdukbsHcFnxTCjugkBtLyIm87XNV5a++y T6rmix4Kj0nULXbirc1APsnE6liLKmyUZym9+Ey3aHxJWS2yDkLGbfE0xczdiVnpzClL GLepvsijAMvuxhwJ8/+MsyfnR4/fih21mvCJquyd9X0Z3XVbSJN9TRhrqqfCmZrgc9nx j3F6FOrZ8D984gi5/Iw1MczsPhPxXFyOV8XLJjJpR/0TpM59QkIlDvECCGHAWCysLm1O 0MxMQGcQELg9hI72cUQSZwb/RbyQApyNo0g3lEm10R//wBJrEGQg11gJiweNy1mzGMO5 TMnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=BzmDpkRUuUoZQOsR8MTTTDEtDyyz0Z+lWGiOl3CT+TM=; b=F0k0D372J83mjCCbh5zb3BktEtxzjOdvY23laL+Dlf6H7WAMHTT3J3dibRN1qWpQV+ K//y8JypGyGxQGEw1G6gMP5kmHFVHj1K7opqetmRZqZWltZr8XOuDfQu6YtjIgT9hOg/ xP/z/b+YOMHgOw5XptMlUndGvcDIwZn7BchKoC/u9LW9yuH0ZRKUo5BsoGhgamMwQHrT Fd7ofhUKUpVaJoKEyW3TQ7cUPo89eCLPHMXEsepF8atLDnMyay76ciQJFeF8yeTreA4z yrMeepD0vBikXfI66ihPB0c5u8b954iRwQytDzWX4Lyri1vSRHRMIStvG6R/YNvR2GUb JYSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x22si5891241pgk.86.2019.10.10.05.00.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Oct 2019 05:00:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C283C6EB0C; Thu, 10 Oct 2019 12:00:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id A542E6EB0C for <dri-devel@lists.freedesktop.org>; Thu, 10 Oct 2019 12:00:12 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9AC0BqL041446; Thu, 10 Oct 2019 07:00:11 -0500 Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9AC0BDW059156 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 10 Oct 2019 07:00:11 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 10 Oct 2019 07:00:07 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 10 Oct 2019 07:00:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9AC0AXv108678; Thu, 10 Oct 2019 07:00:10 -0500 From: Jean-Jacques Hiblot <jjhiblot@ti.com> To: <tomi.valkeinen@ti.com>, <airlied@linux.ie>, <daniel@ffwll.ch> Subject: [PATCH v5 3/8] drm/omap: accept NULL for dma_addr in omap_gem_pin Date: Thu, 10 Oct 2019 13:59:55 +0200 Message-ID: <20191010120000.1421-4-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010120000.1421-1-jjhiblot@ti.com> References: <20191010120000.1421-1-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570708811; bh=xIiunsjj3AVSyCcVA+1k58+E1fmCTUOfcOOacQw/xYM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gDP956vsHlORt0uo9oDvNXSKnvvcXWjYU6uiuGlFDoTs3XMQxbIdACuHPI45o7Y56 EZ3boKbx3XTTCRsfsA4E0LTr9gZbK8xGDKi87hFACjpQdK0VuVm8/zc7sf0ZXrenum 1tvQAt0eD9ZdrCe3aueDMVqJPGSjEvndpOxslB8w= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: jjhiblot@ti.com, jsarha@ti.com, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
None
|
expand
|
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 9201c21e206f..a6562d23d314 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -819,9 +819,11 @@ int omap_gem_pin(struct drm_gem_object *obj, dma_addr_t *dma_addr) refcount_inc(&omap_obj->dma_addr_cnt); } - *dma_addr = omap_obj->dma_addr; + if (dma_addr) + *dma_addr = omap_obj->dma_addr; } else if (omap_gem_is_contiguous(omap_obj)) { - *dma_addr = omap_obj->dma_addr; + if (dma_addr) + *dma_addr = omap_obj->dma_addr; } else { ret = -EINVAL; goto fail;