From patchwork Mon Mar 5 16:48:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 7093 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 208A423DC3 for ; Mon, 5 Mar 2012 16:49:14 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id DA5D8A18186 for ; Mon, 5 Mar 2012 16:49:13 +0000 (UTC) Received: by yhpp61 with SMTP id p61so2009739yhp.11 for ; Mon, 05 Mar 2012 08:49:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.42.132 with SMTP id o4mr6080138igl.58.1330966153110; Mon, 05 Mar 2012 08:49:13 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp30880ibg; Mon, 5 Mar 2012 08:49:12 -0800 (PST) Received: by 10.236.72.195 with SMTP id t43mr21557397yhd.126.1330966152349; Mon, 05 Mar 2012 08:49:12 -0800 (PST) Received: from mail-gy0-f178.google.com (mail-gy0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id d9si16881028yhn.135.2012.03.05.08.49.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Mar 2012 08:49:12 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-gy0-f178.google.com with SMTP id f1so2032935ghb.37 for ; Mon, 05 Mar 2012 08:49:12 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 10.236.46.164 as permitted sender) client-ip=10.236.46.164; Received: from mr.google.com ([10.236.46.164]) by 10.236.46.164 with SMTP id r24mr6134390yhb.101.1330966152185 (num_hops = 1); Mon, 05 Mar 2012 08:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=kMXHa/RMm1aMjl+lpvNqi/6oIArbe6HzDSfIkxRJ58w=; b=K9VREkzt7Fr6W0k9NtLjERzQ8cv2zKOpcnoTdYkTm3IeyqbqM4lnNC++W09wG2XTNR I+8AIUZLxXpB3bnJjefl25GfpSMpTGokuVJtROTEo11IBJXQIt82Db4NEzeLst34znOx 302XuI1K47z7FRetD0G/HZJBeiKW7Yrdh4shaPAw0Bbgg5Tv14OlpGiU/t8PLGMCb2Sq Rhk4aw+hZ3FTdm90g62/oIm9MLqtr1j3Njnsb6p+Ssq0Aod/TxjmVh6v6c5UKSGNVOMY A+1Dtsb5CIu4+iyuiPl7BegnvTrh2EIBKbtw0zs6ze3N1BP5JVIbAKnJpQWdEAgjdrmQ eL9A== Received: by 10.236.46.164 with SMTP id r24mr4737389yhb.101.1330966152131; Mon, 05 Mar 2012 08:49:12 -0800 (PST) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id g7sm41435349yhm.5.2012.03.05.08.49.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Mar 2012 08:49:11 -0800 (PST) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Andy Gross , Rob Clark Subject: [PATCH 04/10] staging: drm/omap: some minor fb cleanups Date: Mon, 5 Mar 2012 10:48:34 -0600 Message-Id: <1330966120-28582-5-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1330966120-28582-1-git-send-email-rob.clark@linaro.org> References: <1330966120-28582-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQn7Nv/eWiPSxFRr5EwojIjZcJiYptYW8jiYrVVkDk6kzIbNJi5XQQsZxOdWscNwqWSHq3zP From: Rob Clark Now that 'struct drm_plane' has a pixel_format field, use that. And fix a minor typo. Signed-off-by: Rob Clark --- drivers/staging/omapdrm/omap_fb.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c index 116a8ff..08e2e35 100644 --- a/drivers/staging/omapdrm/omap_fb.c +++ b/drivers/staging/omapdrm/omap_fb.c @@ -101,7 +101,7 @@ static int omap_framebuffer_create_handle(struct drm_framebuffer *fb, static void omap_framebuffer_destroy(struct drm_framebuffer *fb) { struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); - int i, n = drm_format_num_planes(omap_fb->format->pixel_format); + int i, n = drm_format_num_planes(fb->pixel_format); DBG("destroy: FB ID: %d (%p)", fb->base.id, fb); @@ -204,7 +204,7 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, int x, int y, struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p) { struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); - if (p >= drm_format_num_planes(omap_fb->format->pixel_format)) + if (p >= drm_format_num_planes(fb->pixel_format)) return NULL; return omap_fb->planes[p].bo; } @@ -351,8 +351,8 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, plane->bo = bos[i]; plane->offset = mode_cmd->offsets[i]; - plane->pitch = mode_cmd->pitches[i]; - plane->paddr = pitch; + plane->pitch = pitch; + plane->paddr = 0; } drm_helper_mode_fill_fb_struct(fb, mode_cmd);