From patchwork Mon Sep 11 14:32:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 9947471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4FE43603F4 for ; Mon, 11 Sep 2017 14:33:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F16128C4E for ; Mon, 11 Sep 2017 14:33:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CF0B28C54; Mon, 11 Sep 2017 14:33:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15F7F28CBC for ; Mon, 11 Sep 2017 14:32:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4398C6E3FC; Mon, 11 Sep 2017 14:32:21 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id C908F6E3DF; Mon, 11 Sep 2017 14:32:15 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:41326 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1drPl0-0000vg-2a; Mon, 11 Sep 2017 16:32:14 +0200 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Date: Mon, 11 Sep 2017 16:32:00 +0200 Message-Id: <1505140322-17416-7-git-send-email-noralf@tronnes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505140322-17416-1-git-send-email-noralf@tronnes.org> References: <1505140322-17416-1-git-send-email-noralf@tronnes.org> MIME-Version: 1.0 Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org, =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , laurent.pinchart@ideasonboard.com, dh.herrmann@gmail.com Subject: [Intel-gfx] [PATCH 6/8] drm/fb-cma-helper: Drop unnecessary fbdev buffer offset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Drop the unnecessary fbdev buffer offset, it can only be zero since drm_fb_helper_fill_var() sets xoffset and yoffset to zero; Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_cma_helper.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index f0a2863..49623a4 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -316,7 +316,6 @@ drm_fbdev_cma_create(struct drm_fb_helper *helper, struct drm_gem_cma_object *obj; struct drm_framebuffer *fb; unsigned int bytes_per_pixel; - unsigned long offset; struct fb_info *fbi; size_t size; u32 format; @@ -352,12 +351,9 @@ drm_fbdev_cma_create(struct drm_fb_helper *helper, drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height); - offset = fbi->var.xoffset * bytes_per_pixel; - offset += fbi->var.yoffset * fb->pitches[0]; - dev->mode_config.fb_base = (resource_size_t)obj->paddr; - fbi->screen_base = obj->vaddr + offset; - fbi->fix.smem_start = (unsigned long)(obj->paddr + offset); + fbi->screen_base = obj->vaddr; + fbi->fix.smem_start = (unsigned long)obj->paddr; fbi->screen_size = size; fbi->fix.smem_len = size;