From patchwork Tue Aug 29 09:48:02 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: 9927019 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 13E1A60383 for ; Tue, 29 Aug 2017 09:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05400288B2 for ; Tue, 29 Aug 2017 09:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE743288B5; Tue, 29 Aug 2017 09:48:25 +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 B158B288B2 for ; Tue, 29 Aug 2017 09:48:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C57E6E0E6; Tue, 29 Aug 2017 09:48:25 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id F3B106E385 for ; Tue, 29 Aug 2017 09:48:22 +0000 (UTC) Received: by mail-pg0-x244.google.com with SMTP id t193so2359064pgc.4 for ; Tue, 29 Aug 2017 02:48:22 -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=TElRFLZ/JacrUPHSeqaC+vfic7GwwZpKLCa+Ltf0cpvZsNUUVPPEdvECSTyjYz9t9o 8DuFEECo+GVSax1ous90IisBZrV7B94XZIV9klssyaAd5dFLqJY8e8zlF9ha58cfFazw 1k9oK8D9o1PLcJieazPV3A/Xx/HuG6bFuSu7cSEDnfc2bocjKfLWTfG7ygrvAOsnWLci 7AdivXZQy3H7HCcymGfz2LWBxZf9br8eI4E9bb3K2T4SJjXsQ3NjyoLd3gjqPAc4wTFg Rsa8fRkgMWcQPeQL5o9JXSwFCPp5vTOdbBovHwjHTDC63Hkx5DJ6OmxSBxeAMqm8XDx4 0sgw== 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=tb5MmE4b13yiZX9dHXoyHtjCFsl1A5GPgtVro9G8YKrSDL987gnsB8TRxFe5YimVr+ xF9jB20o9Bp+QSr+o9rM1OfeECCvOOBQzpOLqug6C3CmNh4ZD697vugfOaKmhrY9p1Ra +zCvkwRj2WiM3Dk+josiJrWFJbjCVoRPAHI3U5zI41+dxdLgIdkE41W28I2Smo+n62a7 /md2EcSa/lOEBvkfptTWAv3KfHMUX5ubxo37+KJwwjtKWT4vfNY5/1+S13W83cvNOhOm FSs2bKsKizTlCcW+b1DivW9WeD/keYwfVMeVgDT57WnSJk9JbAzZAY12NkXnGZlsCbd7 aoqA== X-Gm-Message-State: AHYfb5g+k2hsobs/O2/jx49NJz7KFh9zUVU3hlE6sNbZ1Z4M6sUtQTt6 aEvJdTsJRp4FDsG4 X-Received: by 10.98.79.146 with SMTP id f18mr1167768pfj.216.1504000102332; Tue, 29 Aug 2017 02:48:22 -0700 (PDT) Received: from jheikkil-mobl.fi.intel.com ([192.55.54.42]) by smtp.gmail.com with ESMTPSA id w15sm5342177pgo.63.2017.08.29.02.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 02:48:21 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 29 Aug 2017 12:48:02 +0300 Message-Id: <1504000084-25457-2-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504000084-25457-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1504000084-25457-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;