From patchwork Tue Oct 17 20:08: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: 10012801 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 0754B60235 for ; Tue, 17 Oct 2017 20:08:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE08928A13 for ; Tue, 17 Oct 2017 20:08:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E304A28A15; Tue, 17 Oct 2017 20:08:24 +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 94B1728A13 for ; Tue, 17 Oct 2017 20:08:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C2486E720; Tue, 17 Oct 2017 20:08:24 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 265256E736 for ; Tue, 17 Oct 2017 20:08:21 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id g90so2909329wrd.6 for ; Tue, 17 Oct 2017 13:08: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=7oAUHsIUF+AxWrLhMQDZnN0wQhbZLB11IPbNWhrzL1g=; b=r1Q/2Dp/UeOs6+w+LjDsof4eXqOfA73XQ/WDGXAJG0fieYMeRglFcq6XoL19/HNvkV 2aj6n4XiIf/b0Z4mqnepzzBIbD+n1ZZ32yF1CwpfoxWRthRUJair+spzBwbD9lbGm2bo mezEeVYYIdCxJSaD3v5d07F8zuue150WsVDgsJnxcMgsrcZcd1vpL0AEZO5hayaQ7NDk tUc7Rs4+WfhxWPWc/QimaFFzxRgVlBoH4PodJgrcSJzBps+bowPbNCkkPipfuQiHwGC5 oY76J3U5ar9oRW0Lfgvj1ZonGwumM7br5JxsLlSpUj3SMLfcP2r05TN5PKj2/j/khM7m l4hQ== 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=7oAUHsIUF+AxWrLhMQDZnN0wQhbZLB11IPbNWhrzL1g=; b=DQW8rd84lVqvujVYiP0wfDB68NfraPswxlAYLi5TCX+dDMGhhvJ6KCCEm8smF15h3p JXe2WgI4G9rQTziYHL/d+wCBzEKFxSDOhCBcx52MvattPduDXTiQO8EbOVO4qo9H8Mfp z8r62egk6ns1dSsUqRFmZIQ9jrWugcuA0i61Zi0RJWC3uckD9SwSukh/YXGYGHuh6OOH oc7cJ11/p7I9f5gl/0dERRozwYASAnjZS+f2Jk7HgbAe63Kkw7YmiKtLH2QNBhiS+Ntf iA+xjEBGeh5h4w8plM5num6g8bRyb2jmj5lC/a00/RzeCyuOkyG1ZBMkwRprIxN0jEkH SsBw== X-Gm-Message-State: AMCzsaUSLyOIk3yPxSMqC/fpW4ZQrnVi3ISxoXgHpzcVoCmi1Wt4YvRE RjUULnelM8e8tC0idQFVhxuI8Q== X-Google-Smtp-Source: ABhQp+Q3jxavhocpEMqE8cO43371TAH5qYxk91ICYSXuUdKdKmyOgaafAPKfdeTz8CFwoGtsci6kmQ== X-Received: by 10.223.160.41 with SMTP id k38mr135786wrk.252.1508270899546; Tue, 17 Oct 2017 13:08:19 -0700 (PDT) Received: from localhost.localdomain (77-105-101-149.lpok.fi. [77.105.101.149]) by smtp.gmail.com with ESMTPSA id r63sm14595562wmg.13.2017.10.17.13.08.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Oct 2017 13:08:19 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 17 Oct 2017 23:08:08 +0300 Message-Id: <1508270891-22186-3-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508270891-22186-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1508270891-22186-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 2/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 | 15 ++++++--------- drivers/gpu/drm/i915/intel_drv.h | 5 ----- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ccbc7ff..d468adb 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3289,7 +3289,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; @@ -3298,13 +3297,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; spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); @@ -3330,18 +3330,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); @@ -3546,7 +3546,6 @@ static void skylake_update_primary_plane(struct intel_plane *plane, const struct intel_plane_state *plane_state) { struct drm_i915_private *dev_priv = to_i915(plane->base.dev); - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); const struct drm_framebuffer *fb = plane_state->base.fb; enum plane_id plane_id = plane->id; enum pipe pipe = plane->pipe; @@ -3572,8 +3571,6 @@ static void skylake_update_primary_plane(struct intel_plane *plane, dst_w--; dst_h--; - crtc->dspaddr_offset = surf_addr; - spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 298986f..36133e4 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -808,11 +808,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 */