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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5962ECAAD3 for ; Fri, 9 Sep 2022 13:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbiIINI5 (ORCPT ); Fri, 9 Sep 2022 09:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbiIINIw (ORCPT ); Fri, 9 Sep 2022 09:08:52 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD483AF for ; Fri, 9 Sep 2022 06:08:50 -0700 (PDT) Received: from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2903FDD; Fri, 9 Sep 2022 15:08:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1662728929; bh=95i6pSYo5KId5a16NEEkx8bNHa3xBU953QjVyHVJZlg=; h=Date:Subject:To:References:From:In-Reply-To:From; b=vj3bjLgSQDSA6XAAW28orIxzoaLcPXGmeJ6gVGILFxPoqRQMcI66x+BNQrs8h7QNi /vuQ003qmMkuMoce/GqyRmFjQt90uHHBNLThoxVTkrztazJGRRi/1kcImrYM3fGYld HSyITzcVp7igtmm/gpJTvFlKaGkZi4dQTNHMMXEY= Message-ID: <49fba94f-c3b3-d131-2c53-5563675400be@ideasonboard.com> Date: Fri, 9 Sep 2022 16:08:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2] drm: omapdrm: Improve check for contiguous buffers Content-Language: en-US To: Andrew Davis , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20220825162609.14076-1-afd@ti.com> From: Tomi Valkeinen In-Reply-To: <20220825162609.14076-1-afd@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/08/2022 19:26, Andrew Davis wrote: > While a scatter-gather table having only 1 entry does imply it is > contiguous, it is a logic error to assume the inverse. Tables can have > more than 1 entry and still be contiguous. Use a proper check here. > > Signed-off-by: Andrew Davis > --- > > Changes from v1: > - Sent correct version of patch :) Looks fine to me. But where do you need this? Are contiguous buffers with multiple sgt entries handled correctly elsewhere in the driver, i.e. do they work? =) Tomi