From patchwork Tue Sep 19 19:44:08 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: 9960047 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 215666056D for ; Tue, 19 Sep 2017 19:45:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12E9E28EB0 for ; Tue, 19 Sep 2017 19:45:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07E3C28EC4; Tue, 19 Sep 2017 19:45:17 +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 EC1E728EDB for ; Tue, 19 Sep 2017 19:45:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12AF66E626; Tue, 19 Sep 2017 19:44:23 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE7E66E626 for ; Tue, 19 Sep 2017 19:44:21 +0000 (UTC) Received: by mail-lf0-x241.google.com with SMTP id y15so327690lfd.0 for ; Tue, 19 Sep 2017 12:44:21 -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=p8GLVWtGVKMJNaYX60olW1gkNbshgmrbRCjRJMF83Po=; b=ioSwBKR41+m3kNiigiuuhnX4jVle77nhjd+S24dWjx3BkTxNP9bcE8POTw1BJnPs6d d5sMB41w3wv3dxHobMCdzX+P8HEQK9DlSigqMzcglNpKh/LEuQdXjmC7B1An4tQ9OIdO B9T1zIZGfUGwvciDFKjwPSz+0p8gCtdfVDi6HSj7JS07e8iPUoqaczJduSUoR/82q8HZ nIBcF6pBJbzPlDFjATskxQB3BMMrGHpuQIy37Tnity/1habgboIi+IyQ4mK08hojUI1J cBHQ1zMjn+BKHVz/w4bpdVMK45/ts8DFeemto8R/ye8LbaaRQT0MvoSHP+zdTlp0gPXr f4DQ== 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=p8GLVWtGVKMJNaYX60olW1gkNbshgmrbRCjRJMF83Po=; b=i0EZEmeEbg5lIiwhLpsCNYFpsi1wIvcSeNpSOpU5xSTmvzz08dvuXUXdIUwFIy8+wp tRN8kZVD/py/sF8XTp9nEo6DHASYvXxTruShXrN3YvF8MK7fF+1HTNw5TJfKu+HJhYdV x/9P+XZS2t/zvA8+PZl2BhLcQmkxI0CAJ4rdod9+Dys1S6e0r0Y1dpoOjj6SgQN5FaA5 H1M1NddoMn/S88nR1/1Q+eTqb4vOmyy7bY3qthvmTPQOo3YqgfNojDAppFFdo5vHClAN CFzkoTDMiqbJyYS8Hhq/VVtc5tLzNDznbxpvM39+KSNsYCtNOGqTRqLQz0FT1/tAUNNW zTdQ== X-Gm-Message-State: AHPjjUhInDEUboXujt/ZxiH7n2lU0Cmqu2C8us7ZoN8Veg5cvNPVYLTU Vd2aWcfUV2lg09A53yn4q9indkbW X-Google-Smtp-Source: AOwi7QDXv3kbtXKbKmVn/ICCCYPLTtdsOqs4WkPEVVPKCRsX7LaZMH4+8VsnUHPUvoGIUx4NmPy23A== X-Received: by 10.25.27.7 with SMTP id b7mr862439lfb.94.1505850260040; Tue, 19 Sep 2017 12:44:20 -0700 (PDT) Received: from localhost.localdomain (mobile-access-5d6aa2-75.dhcp.inet.fi. [93.106.162.75]) by smtp.gmail.com with ESMTPSA id g83sm22657lji.65.2017.09.19.12.44.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Sep 2017 12:44:19 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Sep 2017 22:44:08 +0300 Message-Id: <1505850249-23527-5-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505850249-23527-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1505850249-23527-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 4/5] 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 | 12 ++++++------ drivers/gpu/drm/i915/intel_drv.h | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 48d5975..d214977 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3298,7 +3298,6 @@ static void i9xx_update_primary_plane(struct intel_plane *primary, const struct intel_plane_state *plane_state) { struct drm_i915_private *dev_priv = to_i915(primary->base.dev); - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); const struct drm_framebuffer *fb = plane_state->base.fb; enum plane plane = primary->plane; u32 linear_offset; @@ -3308,13 +3307,14 @@ static void i9xx_update_primary_plane(struct intel_plane *primary, int y = plane_state->main.y; unsigned long irqflags; struct intel_fbc *fbc = &dev_priv->fbc; + 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; fbc->state_cache.plane.adjusted_x = x; fbc->state_cache.plane.adjusted_y = y; @@ -3343,18 +3343,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 56fb493..a92c2e2 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -803,11 +803,6 @@ struct intel_crtc { unsigned long long enabled_power_domains; struct intel_overlay *overlay; - /* 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; - struct intel_crtc_state *config; /* global reset count when the last flip was submitted */