From patchwork Wed Oct 17 05:30:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gross X-Patchwork-Id: 1604401 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 74E283FD4F for ; Wed, 17 Oct 2012 09:08:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CBBF9ED03 for ; Wed, 17 Oct 2012 02:08:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by gabe.freedesktop.org (Postfix) with ESMTP id 9922F9E852 for ; Tue, 16 Oct 2012 22:30:12 -0700 (PDT) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9H5U9Hb032174; Wed, 17 Oct 2012 00:30:09 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9H5U8YE015878; Wed, 17 Oct 2012 00:30:09 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Wed, 17 Oct 2012 00:30:08 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9H5U84T018788; Wed, 17 Oct 2012 00:30:08 -0500 Received: from localhost (h1-55.vpn.ti.com [172.24.1.55]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q9H5U8w06501; Wed, 17 Oct 2012 00:30:08 -0500 (CDT) From: Andy Gross To: Subject: [PATCH] drm/omap: Remove cpu_is_omapXXXX usage in DMM Date: Wed, 17 Oct 2012 00:30:03 -0500 Message-ID: <1350451803-27880-1-git-send-email-andy.gross@ti.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Cc: Greg Kroah-Hartman , 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: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Removed usage of the cpu_is_omapXXXX in the DMM driver. This is no longer necessary as we can key off of the omap_dmm pointer that is only non-NULL if the device has been probed successfully. Signed-off-by: Andy Gross --- drivers/staging/omapdrm/omap_dmm_tiler.c | 2 +- drivers/staging/omapdrm/omap_dmm_tiler.h | 7 +------ drivers/staging/omapdrm/omap_gem.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c index e2f1e37..6376e17 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.c +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c @@ -487,7 +487,7 @@ size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h) return round_up(geom[fmt].cpp * w, PAGE_SIZE) * h; } -bool dmm_is_initialized(void) +bool dmm_is_available(void) { return omap_dmm ? true : false; } diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.h b/drivers/staging/omapdrm/omap_dmm_tiler.h index 7b1052a..8c1fe5c 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.h +++ b/drivers/staging/omapdrm/omap_dmm_tiler.h @@ -94,7 +94,7 @@ uint32_t tiler_stride(enum tiler_fmt fmt); size_t tiler_size(enum tiler_fmt fmt, uint16_t w, uint16_t h); size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h); void tiler_align(enum tiler_fmt fmt, uint16_t *w, uint16_t *h); -bool dmm_is_initialized(void); +bool dmm_is_available(void); extern struct platform_driver omap_dmm_driver; @@ -126,9 +126,4 @@ static inline bool validfmt(enum tiler_fmt fmt) } } -static inline int dmm_is_available(void) -{ - return cpu_is_omap44xx(); -} - #endif diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c index b740adc..33faa32 100644 --- a/drivers/staging/omapdrm/omap_gem.c +++ b/drivers/staging/omapdrm/omap_gem.c @@ -1408,7 +1408,7 @@ void omap_gem_init(struct drm_device *dev) }; int i, j; - if (!dmm_is_initialized()) { + if (!dmm_is_available()) { /* DMM only supported on OMAP4 and later, so this isn't fatal */ dev_warn(dev->dev, "DMM not available, disable DMM support\n"); return;