From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756115AbcGZOX2 (ORCPT ); Tue, 26 Jul 2016 10:23:28 -0400 Received: from mga14.intel.com ([192.55.52.115]:7802 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbcGZOX0 (ORCPT ); Tue, 26 Jul 2016 10:23:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,425,1464678000"; d="scan'208";a="145687947" Subject: Re: [PATCH v2 1/4] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw To: Lyude , intel-gfx@lists.freedesktop.org, Matt Roper References: <1469129020-2680-1-git-send-email-cpaul@redhat.com> <1469129020-2680-2-git-send-email-cpaul@redhat.com> Cc: stable@vger.kernel.org, =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter , Radhakrishna Sripada , Hans de Goede , Jani Nikula , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org From: Maarten Lankhorst Message-ID: Date: Tue, 26 Jul 2016 16:21:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1469129020-2680-2-git-send-email-cpaul@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Op 21-07-16 om 21:23 schreef Lyude: > From: Matt Roper > > When we write watermark values to the hardware, those values are stored > in dev_priv->wm.skl_hw. However with recent watermark changes, the > results structure we're copying from only contains valid watermark and > DDB values for the pipes that are actually changing; the values for > other pipes remain 0. Thus a blind copy of the entire skl_wm_values > structure will clobber the values for unchanged pipes...we need to be > more selective and only copy over the values for the changing pipes. > > This mistake was hidden until recently due to another bug that caused us > to erroneously re-calculate watermarks for all active pipes rather than > changing pipes. Only when that bug was fixed was the impact of this bug > discovered (e.g., modesets failing with "Requested display configuration > exceeds system watermark limitations" messages and leaving watermarks > non-functional, even ones initiated by intel_fbdev_restore_mode). > > Changes since v1: > - Add a function for copying a pipe's wm values > (skl_copy_wm_for_pipe()) so we can reuse this later > > Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic 'check' (v2)") > Fixes: 9b6130227495 ("drm/i915/gen9: Re-allocate DDB only for changed pipes") > Signed-off-by: Matt Roper > Signed-off-by: Lyude > Reviewed-by: Matt Roper > Cc: stable@vger.kernel.org > Cc: Maarten Lankhorst > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Hans de Goede Testcase: kms_cursor_legacy.2x-flip-vs-cursor-legacy For patch 2/4 too probably.