From patchwork Mon Sep 11 12:28:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juha-Pekka Heikkila X-Patchwork-Id: 9947291 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 97AE4602C9 for ; Mon, 11 Sep 2017 12:29:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AB0828BDC for ; Mon, 11 Sep 2017 12:29:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FC6A28BE6; Mon, 11 Sep 2017 12:29:15 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 3150C28BDC for ; Mon, 11 Sep 2017 12:29:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E09F6E39D; Mon, 11 Sep 2017 12:29:14 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8444E89DC5 for ; Mon, 11 Sep 2017 12:29:12 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id p17so6750452wmd.3 for ; Mon, 11 Sep 2017 05:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f3G/45hrdj8e8Cgc9FMoWkxTpkEna8uaX5hVdXBvCj4=; b=FJ/fO/Q8ApTsGGl2ezus0eSHZL3fN8nlAIcembn3psYgEPlV5I566NZ1nHS+/sHASI zG5+/2t2yhjRH7vo8FJuKFjjp0wSamTOzoLVhOoR8bInz0//hXW5T7c98lL7+91bohC8 8BCZhNiQzClyNqwaOHDdWgbrdC1a1Sv9pXItDnOhPJSycej6EyuN5uGU1w4zs0OmFoMG 2ij8aEZQIE9YxwE1OW9v0/O0vSKSfI3CQ3DmthUGcC/ntrbQn31l4oAR3edyrxbpgpZs pPCHaH1MOMdMbwAtKaAufXvqSNwEH8BXojIaMW1ROJ3d/Q7Tm3+Oh4N6JHcWWUwh9vLC XJNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f3G/45hrdj8e8Cgc9FMoWkxTpkEna8uaX5hVdXBvCj4=; b=rFQ+9id7V0LBJYFKbFdtCxZKMtU4KbJkccEHhjUN5W5AXvBCc1rsh+U+JudXVNuKy/ Evr0p0Sa49FB0110wgSXg1ktRUvRE1Dd3ZdOyxycGrSLE5ky4YKKK25l7lVZqFl3lYC/ C6neINtR6+wD1Hce6uW3iPbaDq5+ZaXn8JwSSTiruCiw4XjyF+y/hpddRHDKvjuEXpua sPD5aF6NXcm1iCc+ZLUGagd3mTU2K13cSceoTJGv2lazGY03arwi7AtmY5Em6bOL9zvX tmkRwkRXG23EczyRQd4fVBwh5nbIH32Toqj1q5NlXnOKW+DFtEnhuLox0/bkSsIFujh4 otqw== X-Gm-Message-State: AHPjjUgmOtBdUpeN8a76Z7/yF0DSmZHohblWCiEJR+rga1weWShMW10O edy4eHz/ur1mvJeC X-Google-Smtp-Source: ADKCNb7uJVhu1waLHXMLhNy+zpHBGBnBJ6zsJUkqD77E79eVjfHgGzCu4anwA2gA8s9KbxsQHA1Djw== X-Received: by 10.80.148.86 with SMTP id q22mr9400518eda.195.1505132950759; Mon, 11 Sep 2017 05:29:10 -0700 (PDT) Received: from jheikkil-MOBL1.fi.intel.com ([2001:998:22:0:90d4:903f:9739:d412]) by smtp.gmail.com with ESMTPSA id t49sm1425111edd.62.2017.09.11.05.29.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Sep 2017 05:29:10 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Mon, 11 Sep 2017 15:28:55 +0300 Message-Id: <1505132937-27327-2-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505132937-27327-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1505132937-27327-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 1/3] drm/i915: dspaddr_offset doesn't need to be more than local variable 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Move u32 dspaddr_offset from struct intel_crtc member into local variable in i9xx_update_primary_plane() Signed-off-by: Juha-Pekka Heikkila --- drivers/gpu/drm/i915/intel_display.c | 11 ++++++----- drivers/gpu/drm/i915/intel_drv.h | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7cd392f..f922e2f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3287,13 +3287,14 @@ static void i9xx_update_primary_plane(struct intel_plane *primary, int x = plane_state->main.x; int y = plane_state->main.y; unsigned long irqflags; + u32 dspaddr_offset; linear_offset = intel_fb_xy_to_linear(x, y, plane_state, 0); if (INTEL_GEN(dev_priv) >= 4) - crtc->dspaddr_offset = plane_state->main.offset; + dspaddr_offset = plane_state->main.offset; else - crtc->dspaddr_offset = linear_offset; + dspaddr_offset = linear_offset; crtc->adjusted_x = x; crtc->adjusted_y = y; @@ -3322,18 +3323,18 @@ static void i9xx_update_primary_plane(struct intel_plane *primary, if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) { I915_WRITE_FW(DSPSURF(plane), intel_plane_ggtt_offset(plane_state) + - crtc->dspaddr_offset); + dspaddr_offset); I915_WRITE_FW(DSPOFFSET(plane), (y << 16) | x); } else if (INTEL_GEN(dev_priv) >= 4) { I915_WRITE_FW(DSPSURF(plane), intel_plane_ggtt_offset(plane_state) + - crtc->dspaddr_offset); + dspaddr_offset); I915_WRITE_FW(DSPTILEOFF(plane), (y << 16) | x); I915_WRITE_FW(DSPLINOFF(plane), linear_offset); } else { I915_WRITE_FW(DSPADDR(plane), intel_plane_ggtt_offset(plane_state) + - crtc->dspaddr_offset); + dspaddr_offset); } POSTING_READ_FW(reg); diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 17649f1..0d0abed1 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -805,7 +805,6 @@ struct intel_crtc { /* Display surface base address adjustement for pageflips. Note that on * gen4+ this only adjusts up to a tile, offsets within a tile are * handled in the hw itself (with the TILEOFF register). */ - u32 dspaddr_offset; int adjusted_x; int adjusted_y;