From patchwork Tue Sep 12 09:19:38 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: 9948821 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 A29E160360 for ; Tue, 12 Sep 2017 09:19:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F41628C0C for ; Tue, 12 Sep 2017 09:19:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8146228C16; Tue, 12 Sep 2017 09:19:56 +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 1AC3F28C0C for ; Tue, 12 Sep 2017 09:19:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB3746E5A9; Tue, 12 Sep 2017 09:19:55 +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 A33A86E591 for ; Tue, 12 Sep 2017 09:19:48 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id k20so5606909wre.1 for ; Tue, 12 Sep 2017 02:19:48 -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=Yi1s0UQGWnT5MuBt+Tq30kmEINy2Gz5VG/Ulxp4AJNc=; b=NWPhs5yCnpSmJmvVgej2ghDizED1gK7gmbXHAY9BW8/nJTg5X2liZAysK6TAJWyLKt PfH4Ss029cgEtOH1FHQCrFbqWPCzOAHwKdug8875XWk4rOkgAAkwOcZFz8k/6ifW3Is0 OIV/8/0Y+nn53DqSrgADhtebxiGZ8MAj/vJj/yjT2hpRVIaQ07JsrwfNJo2+wYZNrNJH WD+Bg2Mgp7SLwT+HmeNfYqFS8QpoS/hoOMjZ3l18OVmb3yxKynjvsEvu2yruir3G/jrm G3PF9WxJYpAqT1u+AUIhaOYzTtcIi+lhjqCkUyutoc0NAWIS4yfrRlIKn9HnYj7y7EEw tF0g== 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=Yi1s0UQGWnT5MuBt+Tq30kmEINy2Gz5VG/Ulxp4AJNc=; b=l0fwV6aAg7cfvd5DVigHH/3OGyLg5ue6KhHdVg4L2WlFBR+SqGGxG5aIxUBnVGRKTQ NGs7rjJcCEmzITCHtiFPQUvsIBsb+LUXPmMBwQU6X7K7U84lGYkE/fvMDCF5NDuTwIyx EdXMDv+Q/+RQ+VxcLGZ0yTHNJ3cvT9bLPd7uZQ2M5G/BCdOHmOaYeLCV02BYRda0ue1O ihfVh33ykTBFionQESplB4yVwicAU2vI59rrHNHOz8PMbXnmjw3u2rpGjxctCE5pYMFG wayZYNzAWja47sQR/JfQmUe1H7wIHnFWygop6TyIXEGmaDc0SIG59cUh0uIdYUwIbLxC rubg== X-Gm-Message-State: AHPjjUj0oOE++PfR9txdzTB9AyCYHo+cfPDn/w3wnKGdYPYDa0J1X8EH Iw2TKERcqZL636Rb X-Google-Smtp-Source: ADKCNb7wtjVxEFNuThVadWdYA2EQv548sjiWf+nhc8kHjgT/jTl4Y41DWsx3n+9oiVS4AeTh91lYPw== X-Received: by 10.223.148.33 with SMTP id 30mr11146972wrq.188.1505207986822; Tue, 12 Sep 2017 02:19:46 -0700 (PDT) Received: from jheikkil-MOBL1.fi.intel.com ([2001:998:22:0:4038:d2aa:1534:de4d]) by smtp.gmail.com with ESMTPSA id w82sm16097443wme.5.2017.09.12.02.19.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Sep 2017 02:19:46 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Sep 2017 12:19:38 +0300 Message-Id: <1505207980-18439-2-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505207980-18439-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1505207980-18439-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 0871807..0dd0e2a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3307,13 +3307,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; @@ -3342,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 3078076..d58cd10 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -806,7 +806,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;