From patchwork Thu Sep 14 09:34:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13384929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 43743EDE99E for ; Thu, 14 Sep 2023 09:35:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5F1B10E559; Thu, 14 Sep 2023 09:35:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id A67A310E559 for ; Thu, 14 Sep 2023 09:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694684107; x=1726220107; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Ewnt1M86Bepu38wNj/pLseuM1jnxPq/gGrWTfL90cQ=; b=eMMY6qZcPvCrPfRC+zOLMGN416Z/bWm72F5Fu+X+N3pM4mcYGHZJH2L1 yROimCcgxPVzRQqeWxT78w08sC30/Hyfe+ZOcSoEgiV3OOE/FmMAB8Ktt mrwgQIprAxm9EVjJqM+KXhKm/z0HcsQ+LCwEesVs7eZ8SCMna08xv4xC6 82cwrj7iTzFWnGXr4+oM4hwPAcX9ZFec7skUFK4Y1ODPNbzQQyAIaCpVB z13AcSlRuF2qnSV6QZJiWvMNRcV362pIRm8HJTF4mGyxOIXAR6cQt0kEQ Fs4mdasnDmMoxkJMaFVXYnnyF3Jf2QfgIu7iF8xubGzTkX0OJK5jmyiZA Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="409856677" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="409856677" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="773825316" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="773825316" Received: from haslam-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.49.56]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:05 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Thu, 14 Sep 2023 12:34:57 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH 1/3] drm/i915/fbc: replace GEM_BUG_ON() to drm_WARN_ON() 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: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Avoid using GEM_BUG_ON() in display code. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_fbc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index 817e5784660b..1cb9eec29640 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -333,12 +333,14 @@ static void i8xx_fbc_program_cfb(struct intel_fbc *fbc) { struct drm_i915_private *i915 = fbc->i915; - GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915), - i915_gem_stolen_node_offset(&fbc->compressed_fb), - U32_MAX)); - GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915), - i915_gem_stolen_node_offset(&fbc->compressed_llb), - U32_MAX)); + drm_WARN_ON(&i915->drm, + range_overflows_end_t(u64, i915_gem_stolen_area_address(i915), + i915_gem_stolen_node_offset(&fbc->compressed_fb), + U32_MAX)); + drm_WARN_ON(&i915->drm, + range_overflows_end_t(u64, i915_gem_stolen_area_address(i915), + i915_gem_stolen_node_offset(&fbc->compressed_llb), + U32_MAX)); intel_de_write(i915, FBC_CFB_BASE, i915_gem_stolen_node_address(i915, &fbc->compressed_fb)); intel_de_write(i915, FBC_LL_BASE, From patchwork Thu Sep 14 09:34:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13384930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 960FEEDE99C for ; Thu, 14 Sep 2023 09:35:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1570F10E55A; Thu, 14 Sep 2023 09:35:14 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 687C710E55F for ; Thu, 14 Sep 2023 09:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694684111; x=1726220111; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r372Xjo2hOZvG+Y7K1UeqO3iCAXLZDFnpRBxBrv57Jc=; b=Ng/r5nChRPRK0QF2w5y4DGNl7TpksfoQ9QOgQpmrOCJZdKk99mbQCgvt V1xRnjBLbhhC+4vST/8uHFch8ezv0iFq0y5/4ZKkdDMgH9KLSFAagJYe0 t/9/N33aFCwEZBUL/Uckh1iycJb2SjwwM+t+kWzaG8wHNKVHdWQeCjls5 yju6hRysQgftDx6B5C/791Hsze9Bk2ZAtERVHB86ppytYL0yBRaHDignZ Z2jerv9kLpFPErz4+YZLPCoL6iR4PZCjXJINxf0pNqxqgwmSx/U2GVCuh qpXRm1Yy2osQ2Zkj1YpKI6bQFuetBxCIXk4lVAFMZOsgGg6bwjeM6evLP g==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="409856701" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="409856701" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="773825322" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="773825322" Received: from haslam-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.49.56]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:09 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Thu, 14 Sep 2023 12:34:58 +0300 Message-Id: <593285450602c259b6985972d68511190c754bf5.1694684044.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH 2/3] drm/i915/fb: replace GEM_WARN_ON() with drm_WARN_ON() 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: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Avoid using GEM_WARN_ON() in display code. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_fb_pin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c index fffd568070d4..7b42aef37d2f 100644 --- a/drivers/gpu/drm/i915/display/intel_fb_pin.c +++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c @@ -35,7 +35,8 @@ intel_pin_fb_obj_dpt(struct drm_framebuffer *fb, * We are not syncing against the binding (and potential migrations) * below, so this vm must never be async. */ - GEM_WARN_ON(vm->bind_async_flags); + if (drm_WARN_ON(&dev_priv->drm, vm->bind_async_flags)) + return ERR_PTR(-EINVAL); if (WARN_ON(!i915_gem_object_is_framebuffer(obj))) return ERR_PTR(-EINVAL); From patchwork Thu Sep 14 09:34:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13384931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 92298EDE99C for ; Thu, 14 Sep 2023 09:35:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB16F10E562; Thu, 14 Sep 2023 09:35:16 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id F28EE10E55F for ; Thu, 14 Sep 2023 09:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694684115; x=1726220115; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nZ2e7e6gznTH6FcpmeDYIt3MPufv7iQ2TMFDb+uvoC0=; b=TG3kfylMV0LrCwPvuuc9vH5C4VfD3ziMSiU12yAjLe6hH3ARXmiTAtwr m/6PPVuemO3DjKf0YbFKNrztRm/otIy0btJOqJxdj6X5BJAKIm7Wi3uX0 jOQEBz49ls27F06AdoEElW91gGk9Bwkmlqu6M0hltOn2McKDit/tLTrHl zrTGMEAn4RPrVJ986w7wXK9Q/M/GaU+MVE6TDgpvhp/sEPy7psSaLVqGV HK0tD0VndByMg/sVdp7i/5C+ZyyxBENJM9FyXf/0ciCfn6/LIq4yUHPiq dIDQDPuNXpKjPrnBZvlE+AAaIEjsvdfrVchodHdhBCA9sgnhuE9EZSRV4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="409856715" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="409856715" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="773825330" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="773825330" Received: from haslam-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.49.56]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 02:35:13 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Thu, 14 Sep 2023 12:34:59 +0300 Message-Id: <17e70eaf967bdfe99111cdbb3bcf6aa2f0b0e837.1694684044.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH 3/3] drm/i915/dpt: replace GEM_BUG_ON() with drm_WARN_ON() 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: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Avoid using GEM_BUG_ON() in display code. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_dpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c index fbfd8f959f17..48582b31b7f7 100644 --- a/drivers/gpu/drm/i915/display/intel_dpt.c +++ b/drivers/gpu/drm/i915/display/intel_dpt.c @@ -29,7 +29,7 @@ static inline struct i915_dpt * i915_vm_to_dpt(struct i915_address_space *vm) { BUILD_BUG_ON(offsetof(struct i915_dpt, vm)); - GEM_BUG_ON(!i915_is_dpt(vm)); + drm_WARN_ON(&vm->i915->drm, !i915_is_dpt(vm)); return container_of(vm, struct i915_dpt, vm); }