From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD139C433ED for ; Wed, 21 Apr 2021 14:32:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AD1D6143B for ; Wed, 21 Apr 2021 14:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243586AbhDUOdF (ORCPT ); Wed, 21 Apr 2021 10:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243227AbhDUOdD (ORCPT ); Wed, 21 Apr 2021 10:33:03 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A766C06174A for ; Wed, 21 Apr 2021 07:32:30 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id i26-20020a9d625a0000b02902a2119f7613so2307975otk.10 for ; Wed, 21 Apr 2021 07:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=Lk9mhpUltJNpMeMC/+MYMF5AVtHdMcxa/Gaf0vfsQCCCNJj9tDSD+Yt0gsFvik3kR2 I1N0CxLCo6qJDWjfOHXnxmah+smujMVA5FU8CRp/HjbzUew2IJ4z238DWKHVzWQGQvAn bss0JKTo5oLvIuqC1kbc1BJqut9z24/EJO/4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=Ni6JmS2/fZ+2BRxsPwmZl8jx87wr7NqlNZNu8cBDQlQW+PQ8jBRy5EOfj8GegsVhzD EANbwMkRu1mrEv91J2bVAzUSyXskDqwnuGnQRiPIPjaHOhYIozesFyzKKQ+B0PAdod/+ 3nlrdTjFTGiYVl+rM2f+Xfc9pSn8qf2CRlGbRVVRUNwXGx/55UAEd/wUc9tJl6zTWbhe p35HU0OUQcCpM6SudCo9puKS+z5qMmEWPCz4aV/otqDI8D88FedmlpTLX3e7uBJGw5+P 2N10DrvweQnNjdDbtfVtH8dIQFxDGdnIY1kWbDsqo9cpjxvM/Snw2GW8c0Ua8w/++dsn SBMg== X-Gm-Message-State: AOAM533t2JxNfOi56JoCUCZ1t64e2+qMrvh9jhOa67uWYX57UE51EB+V e/TZQvHrKVr8WB+xg/P1kJA7VZuEeSHKjJkbw/feBvFK+hI= X-Google-Smtp-Source: ABdhPJzhesco6THmq6TsUiGIDC3hulWXQaMptXynVdEEkp0XyOzFvk6Agm/HhpxmFj31qNzTiQMCz5w39aqGVCzGpgs= X-Received: by 2002:a05:6830:1398:: with SMTP id d24mr24080226otq.281.1619015549354; Wed, 21 Apr 2021 07:32:29 -0700 (PDT) MIME-Version: 1.0 References: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> In-Reply-To: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> From: Daniel Vetter Date: Wed, 21 Apr 2021 16:32:18 +0200 Message-ID: Subject: Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser To: Maarten Lankhorst Cc: intel-gfx , Stephen Rothwell , DRI , Dave Airlie , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst wrote: > > Fixes the following htmldocs warnings: > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > > Reported-by: Stephen Rothwell > Signed-off-by: Maarten Lankhorst > --- > drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c > index e6f1e93abbbb..afb9b7516999 100644 > --- a/drivers/gpu/drm/i915/i915_cmd_parser.c > +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c > @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length, > return 0; > } > > +/** > + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser() > + * @batch_length: length of the commands in batch_obj > + * @trampoline: Whether jump trampolines are used. > + * > + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser(). > + * This has to be preallocated, because the command parser runs in signaling context, > + * and may not allocate any memory. > + * > + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use > + * IS_ERR() to check for errors. Must bre freed() with kfree(). IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not consistent. Also s/bre/be/ -Daniel > + */ > unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > bool trampoline) > { > @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > * @batch_offset: byte offset in the batch at which execution starts > * @batch_length: length of the commands in batch_obj > * @shadow: validated copy of the batch buffer in question > - * @trampoline: whether to emit a conditional trampoline at the end of the batch > + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist() > + * @shadow_map: mapping to @shadow vma > + * @batch_map: mapping to @batch vma > * > * Parses the specified batch buffer looking for privilege violations as > * described in the overview. > -- > 2.31.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3822EC433B4 for ; Wed, 21 Apr 2021 14:32:33 +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 4F85461448 for ; Wed, 21 Apr 2021 14:32:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F85461448 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 749DF6E9BB; Wed, 21 Apr 2021 14:32:31 +0000 (UTC) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23BB66E9BB for ; Wed, 21 Apr 2021 14:32:30 +0000 (UTC) Received: by mail-ot1-x329.google.com with SMTP id 92-20020a9d02e50000b029028fcc3d2c9eso16627912otl.0 for ; Wed, 21 Apr 2021 07:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=Lk9mhpUltJNpMeMC/+MYMF5AVtHdMcxa/Gaf0vfsQCCCNJj9tDSD+Yt0gsFvik3kR2 I1N0CxLCo6qJDWjfOHXnxmah+smujMVA5FU8CRp/HjbzUew2IJ4z238DWKHVzWQGQvAn bss0JKTo5oLvIuqC1kbc1BJqut9z24/EJO/4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=uDXtoTJ8h4JxYMMOl5AINxwIuiywCxm3/Ewvl5SjGv8o5QYFnm1CVnw6yx9HNfhipi KeoTGmd/iRMI12XNhblmhMs8+vyxxwEZHu21B36gw/vqequP9Z1DrkmhDcX/6zk+q85G JbnXCJXUKphpE8r/s73YFtgZjjVBcw1um7DJ7SpCFZNZmyJFiZVnn3B7TvgOJaphTx82 nG8UpGiCy6HfIiuXlMeP2Dh93Nnh65RqT20gmnI3tqm2DDH8VJt2lrJHbtvo8hE2qoeo mpLviTsclbVKq/ZcRRaXG4sITQvUolB96Tr90rSz9wJ3lK/dozMr0H2d2i/anLu5DPr5 nChw== X-Gm-Message-State: AOAM533mO9o9EKfF8VuW/Sg++ocdLVyLd3EI9K/ieATzMOs7Et9guZ5M gVpnTPYiOK65fR4ZpSQV/pFxl4DbZyGK9f5zjVNGTw== X-Google-Smtp-Source: ABdhPJzhesco6THmq6TsUiGIDC3hulWXQaMptXynVdEEkp0XyOzFvk6Agm/HhpxmFj31qNzTiQMCz5w39aqGVCzGpgs= X-Received: by 2002:a05:6830:1398:: with SMTP id d24mr24080226otq.281.1619015549354; Wed, 21 Apr 2021 07:32:29 -0700 (PDT) MIME-Version: 1.0 References: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> In-Reply-To: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> From: Daniel Vetter Date: Wed, 21 Apr 2021 16:32:18 +0200 Message-ID: Subject: Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser To: Maarten Lankhorst X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Airlie , Stephen Rothwell , intel-gfx , Linux Kernel Mailing List , DRI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst wrote: > > Fixes the following htmldocs warnings: > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > > Reported-by: Stephen Rothwell > Signed-off-by: Maarten Lankhorst > --- > drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c > index e6f1e93abbbb..afb9b7516999 100644 > --- a/drivers/gpu/drm/i915/i915_cmd_parser.c > +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c > @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length, > return 0; > } > > +/** > + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser() > + * @batch_length: length of the commands in batch_obj > + * @trampoline: Whether jump trampolines are used. > + * > + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser(). > + * This has to be preallocated, because the command parser runs in signaling context, > + * and may not allocate any memory. > + * > + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use > + * IS_ERR() to check for errors. Must bre freed() with kfree(). IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not consistent. Also s/bre/be/ -Daniel > + */ > unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > bool trampoline) > { > @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > * @batch_offset: byte offset in the batch at which execution starts > * @batch_length: length of the commands in batch_obj > * @shadow: validated copy of the batch buffer in question > - * @trampoline: whether to emit a conditional trampoline at the end of the batch > + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist() > + * @shadow_map: mapping to @shadow vma > + * @batch_map: mapping to @batch vma > * > * Parses the specified batch buffer looking for privilege violations as > * described in the overview. > -- > 2.31.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE4B4C433ED for ; Wed, 21 Apr 2021 14:32:36 +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 0C93C6143B for ; Wed, 21 Apr 2021 14:32:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C93C6143B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 C8F006E9BF; Wed, 21 Apr 2021 14:32:31 +0000 (UTC) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2455A6E9BE for ; Wed, 21 Apr 2021 14:32:30 +0000 (UTC) Received: by mail-ot1-x330.google.com with SMTP id d3-20020a9d29030000b029027e8019067fso37199297otb.13 for ; Wed, 21 Apr 2021 07:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=Lk9mhpUltJNpMeMC/+MYMF5AVtHdMcxa/Gaf0vfsQCCCNJj9tDSD+Yt0gsFvik3kR2 I1N0CxLCo6qJDWjfOHXnxmah+smujMVA5FU8CRp/HjbzUew2IJ4z238DWKHVzWQGQvAn bss0JKTo5oLvIuqC1kbc1BJqut9z24/EJO/4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KatKMRcorHaCB8knJAAJ9JHDSKXTyx9e9HLULQuHgrw=; b=b4bl500GWTiG+GwlpUB9K4hzljGwE9cmEz+bl1+PwHdA2abJjz+wFoLzp5V2wa8EU4 phFMHOtYvjqqfGcOMNpgRhq5TcV2XKr/ilvljhb6NTGfMeV0mJZ2rA2a8FR10sqmwekw lLet1k3OnftmDuuntj8DqDsXXr2MXIf9h2aNFHZyUaxRohvP5J1Qypfx/MY3kzooABFj PipGfNYCEk5SvAIhBkbH1VVMRBWofKAtuGR1E68NEXWEfGEi/jLrIMpkSzGq7ein7XSe vrDW3fDuEdNH+ZibW+5D0OelsK2tEsXtKhTS6eUHZsfpNt4gRo2d46W46xFmLswlp+HF EYjw== X-Gm-Message-State: AOAM533abVwcJl9qwqoEe/zqR4E84ER7gGUoXD1HZ5npvoSpYCFm9tn5 zW7jpk9gPAK7B0Zmm6D4PCVd2Bta8xKQX1uu533Qwg== X-Google-Smtp-Source: ABdhPJzhesco6THmq6TsUiGIDC3hulWXQaMptXynVdEEkp0XyOzFvk6Agm/HhpxmFj31qNzTiQMCz5w39aqGVCzGpgs= X-Received: by 2002:a05:6830:1398:: with SMTP id d24mr24080226otq.281.1619015549354; Wed, 21 Apr 2021 07:32:29 -0700 (PDT) MIME-Version: 1.0 References: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> In-Reply-To: <20210421120353.544518-1-maarten.lankhorst@linux.intel.com> From: Daniel Vetter Date: Wed, 21 Apr 2021 16:32:18 +0200 Message-ID: To: Maarten Lankhorst Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser 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: Dave Airlie , Stephen Rothwell , intel-gfx , Linux Kernel Mailing List , DRI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst wrote: > > Fixes the following htmldocs warnings: > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' > drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' > > Reported-by: Stephen Rothwell > Signed-off-by: Maarten Lankhorst > --- > drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c > index e6f1e93abbbb..afb9b7516999 100644 > --- a/drivers/gpu/drm/i915/i915_cmd_parser.c > +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c > @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length, > return 0; > } > > +/** > + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser() > + * @batch_length: length of the commands in batch_obj > + * @trampoline: Whether jump trampolines are used. > + * > + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser(). > + * This has to be preallocated, because the command parser runs in signaling context, > + * and may not allocate any memory. > + * > + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use > + * IS_ERR() to check for errors. Must bre freed() with kfree(). IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not consistent. Also s/bre/be/ -Daniel > + */ > unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > bool trampoline) > { > @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length, > * @batch_offset: byte offset in the batch at which execution starts > * @batch_length: length of the commands in batch_obj > * @shadow: validated copy of the batch buffer in question > - * @trampoline: whether to emit a conditional trampoline at the end of the batch > + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist() > + * @shadow_map: mapping to @shadow vma > + * @batch_map: mapping to @batch vma > * > * Parses the specified batch buffer looking for privilege violations as > * described in the overview. > -- > 2.31.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx