From patchwork Tue Aug 23 15:00:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 9295773 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 BFDC560574 for ; Tue, 23 Aug 2016 15:00:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEB2827BFF for ; Tue, 23 Aug 2016 15:00:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD1B2876A; Tue, 23 Aug 2016 15:00:08 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 B783227BFF for ; Tue, 23 Aug 2016 15:00:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2B786E6B5; Tue, 23 Aug 2016 15:00:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C7676E6B5 for ; Tue, 23 Aug 2016 15:00:04 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 23 Aug 2016 08:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,566,1464678000"; d="scan'208"; a="1045923305" Received: from ananthak-mobl2.ger.corp.intel.com (HELO mwahaha.ger.corp.intel.com) ([10.252.5.230]) by fmsmga002.fm.intel.com with ESMTP; 23 Aug 2016 08:00:02 -0700 From: Matthew Auld To: intel-gfx@lists.freedesktop.org Date: Tue, 23 Aug 2016 16:00:01 +0100 Message-Id: <1471964401-24376-1-git-send-email-matthew.auld@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH] drm/i915: use offset value in DRM_DEBUG_KMS 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 We go through all the trouble of reading the offset from hw, but never end up using it. Later in the DRM_DEBUG_KMS statement we mistakenly use the base as the offset. Let's fix this by now making use of both the offset and the base, and while we are here make the format more consistent. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b10bea6..a5c80cb5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8765,9 +8765,9 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc, plane_config->size = fb->pitches[0] * aligned_height; - DRM_DEBUG_KMS("pipe/plane %c/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", + DRM_DEBUG_KMS("pipe/plane %c/%d with fb: size=%dx%d@%d, base=%x, offset=%x, pitch=%d, size=0x%x\n", pipe_name(pipe), plane, fb->width, fb->height, - fb->bits_per_pixel, base, fb->pitches[0], + fb->bits_per_pixel, base, offset, fb->pitches[0], plane_config->size); plane_config->fb = intel_fb; @@ -9789,9 +9789,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc, plane_config->size = fb->pitches[0] * aligned_height; - DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", + DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, base=%x, offset=%x, pitch=%d, size=0x%x\n", pipe_name(pipe), fb->width, fb->height, - fb->bits_per_pixel, base, fb->pitches[0], + fb->bits_per_pixel, base, offset, fb->pitches[0], plane_config->size); plane_config->fb = intel_fb; @@ -9886,9 +9886,9 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc, plane_config->size = fb->pitches[0] * aligned_height; - DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", + DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, base=%x, offset=%x, pitch=%d, size=0x%x\n", pipe_name(pipe), fb->width, fb->height, - fb->bits_per_pixel, base, fb->pitches[0], + fb->bits_per_pixel, base, offset, fb->pitches[0], plane_config->size); plane_config->fb = intel_fb;