From patchwork Fri Aug 14 02:49:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E908A109B for ; Fri, 14 Aug 2020 09:46:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0C9C206B2 for ; Fri, 14 Aug 2020 09:46:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0C9C206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AAD46E2EF; Fri, 14 Aug 2020 09:46:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 793F66E2EF for ; Fri, 14 Aug 2020 09:46:08 +0000 (UTC) IronPort-SDR: 7jNROBoYVcVxufeVrSXUab91grzKmK4mmvVmxZEVnpB7gw/beRt58PRCI66LqBYpnR96ZiIrh9 hcZPahhfi8mQ== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026585" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026585" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:07 -0700 IronPort-SDR: isMhC1ClflQe8RxQHLLiyJCh9fVMHFmH6IXTmZFNvQrBS8OHMgJ7/c+U4zs0BTTrHP9hBLmq9I Vszlvlt5tERw== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068590" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:06 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:43 +0530 Message-Id: <20200814024950.26830-1-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/8] Critical KlockWork Error - Fixes - intel_cdclk.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c index 9d6cacbdb691..1cd0ab5b36d2 100644 --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -1926,7 +1926,11 @@ intel_set_cdclk_pre_plane_update(struct intel_atomic_state *state) intel_atomic_get_old_cdclk_state(state); const struct intel_cdclk_state *new_cdclk_state = intel_atomic_get_new_cdclk_state(state); - enum pipe pipe = new_cdclk_state->pipe; + enum pipe pipe; + + if (!(old_cdclk_state && new_cdclk_state)) + return + (void)(pipe = new_cdclk_state->pipe); if (!intel_cdclk_changed(&old_cdclk_state->actual, &new_cdclk_state->actual)) @@ -1955,7 +1959,13 @@ intel_set_cdclk_post_plane_update(struct intel_atomic_state *state) intel_atomic_get_old_cdclk_state(state); const struct intel_cdclk_state *new_cdclk_state = intel_atomic_get_new_cdclk_state(state); - enum pipe pipe = new_cdclk_state->pipe; + enum pipe pipe; + + if (!(old_cdclk_state && new_cdclk_state)) + return + (void)(pipe = new_cdclk_state->pipe); + + if (!intel_cdclk_changed(&old_cdclk_state->actual, &new_cdclk_state->actual)) @@ -2484,6 +2494,9 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state) old_cdclk_state = intel_atomic_get_old_cdclk_state(state); + if (!(old_cdclk_state && new_cdclk_state)) + return + new_cdclk_state->active_pipes = intel_calc_active_pipes(state, old_cdclk_state->active_pipes); From patchwork Fri Aug 14 02:49:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714023 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06ED8138C for ; Fri, 14 Aug 2020 09:46:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E208F206B2 for ; Fri, 14 Aug 2020 09:46:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E208F206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 549216E2F2; Fri, 14 Aug 2020 09:46:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AB3B6E2EF for ; Fri, 14 Aug 2020 09:46:09 +0000 (UTC) IronPort-SDR: V/lX4zea3TbDM6A5PY8qDfxnCByF15uj9k7Ta6S+3Z3BpCd7+NLulNYeARg58q7KLQpoeMUA+Y tf5LcXJP52ow== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026586" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026586" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:08 -0700 IronPort-SDR: VZYWOQ0KAQFsVEnl5mkciuc42xbXQGAxt4pXCtUM1H2hrtIdXtzHOobOhpWMKvqnlQrKH7ixsG vlKfbw0PLCPw== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068599" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:07 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:44 +0530 Message-Id: <20200814024950.26830-2-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/8] Critical KlockWork Error - Fixes - intel_atomic.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_atomic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c index 630f49b7aa01..49ca65b207df 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic.c +++ b/drivers/gpu/drm/i915/display/intel_atomic.c @@ -192,6 +192,8 @@ intel_connector_needs_modeset(struct intel_atomic_state *state, old_conn_state = drm_atomic_get_old_connector_state(&state->base, connector); new_conn_state = drm_atomic_get_new_connector_state(&state->base, connector); + if (!(old_conn_state && new_conn_state)) + return 0; return old_conn_state->crtc != new_conn_state->crtc || (new_conn_state->crtc && From patchwork Fri Aug 14 02:49:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714025 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DEA7109B for ; Fri, 14 Aug 2020 09:46:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25F1D206B2 for ; Fri, 14 Aug 2020 09:46:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25F1D206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E635A6EB17; Fri, 14 Aug 2020 09:46:12 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6EDCF6EB17 for ; Fri, 14 Aug 2020 09:46:10 +0000 (UTC) IronPort-SDR: LhVjLGRJTNIZszIsRHE8FPfGGI4si11iDBkGHF5RDZc5wd6HhzTzar2NI0aRfcEcrZgS43AZSH clGsTIqwhRAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026589" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026589" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:10 -0700 IronPort-SDR: E6RHUQ9EN6RWr2Zf91U4gIU2Qs7eh6th6YmDpehmiHrIQwdPQ0TRkQG8q2skyzl0aDDHEbLGga R8Qs1z9wQ/Jg== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068608" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:09 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:45 +0530 Message-Id: <20200814024950.26830-3-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/8] Critical KlockWork Error - Fixes - intel_fbdev.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_fbdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c index bd39eb6a21b8..ec4f82559fc1 100644 --- a/drivers/gpu/drm/i915/display/intel_fbdev.c +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c @@ -595,9 +595,11 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous * been restored from swap. If the object is stolen however, it will be * full of whatever garbage was left in there. */ - if (state == FBINFO_STATE_RUNNING && - intel_fb_obj(&ifbdev->fb->base)->stolen) + if (ifbdev->fb && intel_fb_obj(&ifbdev->fb->base)) { + if (state == FBINFO_STATE_RUNNING && + intel_fb_obj(&ifbdev->fb->base)->stolen) memset_io(info->screen_base, 0, info->screen_size); + } drm_fb_helper_set_suspend(&ifbdev->helper, state); console_unlock(); From patchwork Fri Aug 14 02:49:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66C46109B for ; Fri, 14 Aug 2020 09:46:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F1FF206B2 for ; Fri, 14 Aug 2020 09:46:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F1FF206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 395E36EB1A; Fri, 14 Aug 2020 09:46:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id D83566EB17 for ; Fri, 14 Aug 2020 09:46:11 +0000 (UTC) IronPort-SDR: cQIf6vclkbT9cHsd+w61JRmSJCi/jPEvB+u+ryG+wHegy2UGnQ+wwSoKtIhkaYeucm+BkNrMOW v64hK7kyjJ9Q== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026590" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026590" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:11 -0700 IronPort-SDR: fim6gnP4vRfVcD/l5qksWMUU8oQjoV35IcBDHWN9QMe1sulrBLxS2GE5GshSViEZJt9HY1B5eR VOleEtrHJ4eg== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068617" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:10 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:46 +0530 Message-Id: <20200814024950.26830-4-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 4/8] Critical KlockWork Error - Fixes - intel_display.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 2ddabf92adde..30d189094e97 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2265,9 +2265,9 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb, pinctl = 0; if (HAS_GMCH(dev_priv)) pinctl |= PIN_MAPPABLE; - - vma = i915_gem_object_pin_to_display_plane(obj, - alignment, view, pinctl); + if (obj) + vma = i915_gem_object_pin_to_display_plane(obj, + alignment, view, pinctl); if (IS_ERR(vma)) goto err; From patchwork Fri Aug 14 02:49:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714029 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C237109B for ; Fri, 14 Aug 2020 09:46:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 645FB206B2 for ; Fri, 14 Aug 2020 09:46:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 645FB206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A37086EB1B; Fri, 14 Aug 2020 09:46:14 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 490E16EB1B for ; Fri, 14 Aug 2020 09:46:13 +0000 (UTC) IronPort-SDR: CyHzvmZOU9JpZSvfWF7gEGDyPN5x3J2rnEwwFf5sACaCZPfo+DtXox3c4M6Ljq4rLQPd8f1HGM Rm98lGqo5wKQ== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026593" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026593" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:13 -0700 IronPort-SDR: C9ucOHqHNi1zwJjYxmAP/3uSSmsDTGPTRg1v/7e5JVE25fO3iMk0sGw474sxYqp2IpXBmY0zHP eknj640X7BbQ== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068624" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:11 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:47 +0530 Message-Id: <20200814024950.26830-5-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 5/8] Critical KlockWork Error - Fixes - intel_sdvo.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 2da4388e1540..279b2be958bb 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -2505,6 +2505,9 @@ static int intel_sdvo_atomic_check(struct drm_connector *conn, struct intel_sdvo_connector_state *new_state = to_intel_sdvo_connector_state(new_conn_state); + if (!(new_conn_state && old_conn_state && old_state && new_state)) + return 0; + if (new_conn_state->crtc && (memcmp(&old_state->tv, &new_state->tv, sizeof(old_state->tv)) || memcmp(&old_conn_state->tv, &new_conn_state->tv, sizeof(old_conn_state->tv)))) { From patchwork Fri Aug 14 02:49:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714031 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 289AE109B for ; Fri, 14 Aug 2020 09:46:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B6BF206B2 for ; Fri, 14 Aug 2020 09:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B6BF206B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F54E6EB1C; Fri, 14 Aug 2020 09:46:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE40B6EB1C for ; Fri, 14 Aug 2020 09:46:14 +0000 (UTC) IronPort-SDR: CNe5Vtm4snxUQil86CTAQOQGro0uAWZ34DTa9zSz4imZXhcZBEFaDvLR5PkezG+6Lb8XNGPtUr pu+dz8QD0wig== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026594" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026594" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:14 -0700 IronPort-SDR: f+z6pN2oI7lN8jG51cPcW8YltwXVs+ANHkVhjNqo9XWgO00ZN8oN+XhckN3qS40hfqNkI3OUrP ptATs2EhZS3Q== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068631" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:13 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:48 +0530 Message-Id: <20200814024950.26830-6-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 6/8] Critical KlockWork Error - Fixes - intel_tv.c - Possible NullPointerDereference1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_tv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c index 777032d9697b..862ea94ffdae 100644 --- a/drivers/gpu/drm/i915/display/intel_tv.c +++ b/drivers/gpu/drm/i915/display/intel_tv.c @@ -1842,14 +1842,17 @@ static int intel_tv_atomic_check(struct drm_connector *connector, old_state = drm_atomic_get_old_connector_state(state, connector); new_crtc_state = drm_atomic_get_new_crtc_state(state, new_state->crtc); - if (old_state->tv.mode != new_state->tv.mode || - old_state->tv.margins.left != new_state->tv.margins.left || - old_state->tv.margins.right != new_state->tv.margins.right || - old_state->tv.margins.top != new_state->tv.margins.top || - old_state->tv.margins.bottom != new_state->tv.margins.bottom) { + if (old_state && new_state && new_crtc_state) { + + if (old_state->tv.mode != new_state->tv.mode || + old_state->tv.margins.left != new_state->tv.margins.left || + old_state->tv.margins.right != new_state->tv.margins.right || + old_state->tv.margins.top != new_state->tv.margins.top || + old_state->tv.margins.bottom != new_state->tv.margins.bottom) { /* Force a modeset. */ new_crtc_state->connectors_changed = true; + } } return 0; From patchwork Fri Aug 14 02:49:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C5FC138C for ; Fri, 14 Aug 2020 09:46:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84D87206DA for ; Fri, 14 Aug 2020 09:46:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84D87206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1510B6EB1E; Fri, 14 Aug 2020 09:46:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 258BD6EB1C for ; Fri, 14 Aug 2020 09:46:16 +0000 (UTC) IronPort-SDR: 9FWsSVgLZHQl9mhWvW4CxKpIlqkAAs3y+5iD/7LK5sYkipFAh8Nzm+OXnr1EHAuNlWceDM2b+g 6CYT7i3ivM/A== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026597" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026597" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:15 -0700 IronPort-SDR: 6JjXjlIZRqYpDwJVazzHvX1po1jGQHgYAsTlkdqcDcJU6FA0EPVWQCUzpNYUtrNEXTINvQV0B7 slNv8bevf+1g== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068635" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:14 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:49 +0530 Message-Id: <20200814024950.26830-7-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 7/8] Critical KlockWork Error - Fixes - intel_display_power.c - Possible NullPointerDereference2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_display_power.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 7946c6af4b1e..9530f6e0b10c 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -601,6 +601,9 @@ icl_tc_phy_aux_power_well_enable(struct drm_i915_private *dev_priv, bool timeout_expected; u32 val; + if (!dig_port) + return; + icl_tc_port_assert_ref_held(dev_priv, power_well, dig_port); val = intel_de_read(dev_priv, DP_AUX_CH_CTL(aux_ch)); From patchwork Fri Aug 14 02:49:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nischal Varide X-Patchwork-Id: 11714035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE3E8109B for ; Fri, 14 Aug 2020 09:46:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A6A27206DA for ; Fri, 14 Aug 2020 09:46:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6A27206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD9376EB20; Fri, 14 Aug 2020 09:46:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 897936EB1D for ; Fri, 14 Aug 2020 09:46:17 +0000 (UTC) IronPort-SDR: MoKAPQ+EMbR62SM1PR+IiboovuuAgsW1lEVpByoJuRFEhHSImkpvawqB7ZkdVxy8OfAh80gfXA FJZ7q+kPo5gA== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="152026599" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="152026599" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:46:17 -0700 IronPort-SDR: p2i9q5eCH2Ca4FdH9Dt6zlvYR16Cq5Zl7mvtM8FwY2pb0SmVce0JeTFjUaiDsX2FtxuKxzC0F2 kxP2afxqWQ2A== X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068642" Received: from unknown (HELO john.iind.intel.com) ([10.223.74.105]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Aug 2020 02:46:16 -0700 From: Nischal Varide To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Aug 2020 08:19:50 +0530 Message-Id: <20200814024950.26830-8-nischal.varide@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200814024950.26830-1-nischal.varide@intel.com> References: <20200814024950.26830-1-nischal.varide@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 8/8] Critical KlockWork Error - Fixes - intel_combo_phy.c Uninitialized Variable-1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nischal Varide Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --- drivers/gpu/drm/i915/display/intel_combo_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c index eccaa79cb4a9..6e721b8ed611 100644 --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c @@ -258,7 +258,7 @@ static bool phy_is_master(struct drm_i915_private *dev_priv, enum phy phy) static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv, enum phy phy) { - bool ret; + bool ret = 1; u32 expected_val = 0; if (!icl_combo_phy_enabled(dev_priv, phy))