Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5521545pxb; Mon, 14 Feb 2022 00:39:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYKzsvnKTBFPAwAJ5kqWzHOPfwgGV6kxWa0ALOb64NSIRa10Q6I5aktfjYV4G55MrNcwsV X-Received: by 2002:a05:6402:50cd:: with SMTP id h13mr14276124edb.256.1644827948949; Mon, 14 Feb 2022 00:39:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644827948; cv=none; d=google.com; s=arc-20160816; b=sq+GA8jXomYwbkciOksMyA3p1DArIHHwcUgEJk5U3y6PRrZ1WvbpTEM3Hx7UXghx9s /qktMfMTCB7A4aMxmFsHKDHKMXerU0mBlAEEyIlhVdLWBBuO9mbbZjvqvehahzUUqoqH E0CMe07992SHKvNEHBOtAa7Eqmtc+yqrXBH3BgwmTVctg5XfWWn5wVmRCkIxV7k3AYm3 WsT4hS8/gS5NilmKPIQV8XLKEzxLLzCA0qDGz7w281fNY+04lpdjoS99SLEEHXkRps5z fPPK+zJc++PUix3gggktAwfXPtQQLi9J/8pYimsAJewx8fTFr2N1OCUscDoPAq5u7uPm 7CdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=bT6rvQckvjjqoQ/XD4T+3/+zVByG4H4VWI5uUBKOAg4=; b=ReLYUBGteUmhJxh//CGEaKGVx4zFVNswKFgxbXn7egGXhgofkm9yzWYueGtUmFUd4N QuWNKvL1BtJ3HA1oWXnf9xqBhcNTD8TOUMb4xBCVSUw/zC1NTFN6+OjMoqkEuABkMvUR mqJfhYh0s53gj7oYAunfDh3TW78haSB+mE9rHhsBi9/CCDQw1F1cu/jTFQCF/YKV2uVQ 34QyFnjIy4ameedMMfSoE+Qj+QwahTu061e0fPhncCmNfhvqsylWFFbK7OhJWULPJU+C JDKlQCi4LZw49Mhxy0CJVSHFZtN4fS+nIfNmoeBqmRrkpfPbFIr04Y8iAFENE2HMXQwP ReBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HPn4S+tf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg3si170382ejc.930.2022.02.14.00.38.46; Mon, 14 Feb 2022 00:39:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HPn4S+tf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241137AbiBNHIx (ORCPT + 99 others); Mon, 14 Feb 2022 02:08:53 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241058AbiBNHIt (ORCPT ); Mon, 14 Feb 2022 02:08:49 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA585839A; Sun, 13 Feb 2022 23:08:42 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id z22so140971edd.1; Sun, 13 Feb 2022 23:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bT6rvQckvjjqoQ/XD4T+3/+zVByG4H4VWI5uUBKOAg4=; b=HPn4S+tf8qOXyHQ5GU6E8u5bHjBSKm5IzPld4ZhfDFML1a+poKQibfGDvysgT7hOhf nqFFLgTxXhiCiVP8XWcGz54JAHJ7gd5yI90I7mAeLZOb18apwb3t4DL+VZldUZB5gO5P 44q+bLKCrDFZkzbiECM4djYg9a1T6TlAdrDWxelvbD3XZ/+wVeaMzHi+n18libKQDXkR wpUTYEj2KhKlG8SWPVXVpE2VBweDTvQmZ3GzfmB+ptDb20CU8z0uEIywewyRZ54qNpTX OCva1p86LeH2mYN2ppeBYFuJgJIK8vUEdbXuUt6jkgrupsrh27a4K5dkvJydJfvhD5MD vsew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bT6rvQckvjjqoQ/XD4T+3/+zVByG4H4VWI5uUBKOAg4=; b=pxxDKPITzWNVbMFW1g+e99vQnEJ513GpArLWaQ2MY3TRuOn0QqcqQJnZ/QlT+LVyA5 cEEE4fLNjqq54/DCxWc6P+vCimpQ2g7U3QD1lPqv/xUnQytzkkTNFjjh5S0jIvXYTeVt WxpXoxsBB+9OEeX3oZP9eQnBnCCs0fsBGqiPK7Bxiqm+gzpUU7uyme5zbDILRbApt2dg 3jhqKoPPuAy3Z9yZy4zskegU2gJhPCmCS4ffalC9iaIXj+vOAvG/KKrF6PNnotpGSf9u zjMrQqVpKPgyKnUtr1ZSYN0cXIOdAJIEymCopkYbjmK3cQGeIX0DgpcsOVYMih59NGec 6tJg== X-Gm-Message-State: AOAM532flGzmMkFRFiS5FOqMC4GqqiJeAob0/nFUUJZfxhcE1L+p3ZZ1 Gf45i46epm39ETDB1knk3yg= X-Received: by 2002:aa7:cdc1:: with SMTP id h1mr407580edw.398.1644822520764; Sun, 13 Feb 2022 23:08:40 -0800 (PST) Received: from [192.168.1.10] ([46.249.74.23]) by smtp.googlemail.com with ESMTPSA id j8sm626580edw.40.2022.02.13.23.08.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Feb 2022 23:08:40 -0800 (PST) Subject: Re: [PATCH 0/3] drm: omapdrm: Fix excessive GEM buffers DMM/CMA usage To: tomba@kernel.org, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, merlijn@wizzup.org, tony@atomide.com References: <1642587791-13222-1-git-send-email-ivo.g.dimitrov.75@gmail.com> From: Ivaylo Dimitrov Message-ID: Date: Mon, 14 Feb 2022 09:08:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1642587791-13222-1-git-send-email-ivo.g.dimitrov.75@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gentle ping On 19.01.22 г. 12:23 ч., Ivaylo Dimitrov wrote: > This patch series fixes excessive DMM or CMA usage of GEM buffers leading to > various runtime allocation failures. The series enables daily usage of devices > without exausting limited resources like CMA or DMM space if GPU rendering is > needed. > > The first patch doesn't bring any functional changes, it just moves some > TILER/DMM related code to a separate function, to simplify the review of the > next two patches. > > The second patch allows off-CPU rendering to non-scanout buffers. Without that > patch, it is basically impossible to use the driver allocated GEM buffers on > OMAP3 for anything else but a basic CPU rendered examples as if we want GPU > rendering, we must allocate buffers as scanout buffers, which are CMA allocated. > CMA soon gets fragmented and we start seeing allocation failures. Such failres > in Xorg cannot be handeled gracefully, so the system is basically unusable. > > Third patch fixes similar issue on OMAP4/5, where DMM/TILER spaces get > fragmented with time, leading to allocation failures. > > Series were tested on Motolola Droid4 and Nokia N900, with OMAP DDX and > PVR EXA from https://github.com/maemo-leste/xf86-video-omap > > Ivaylo Dimitrov (3): > drm: omapdrm: simplify omap_gem_pin > drm: omapdrm: Support exporting of non-contiguous GEM BOs > drm: omapdrm: Do no allocate non-scanout GEMs through DMM/TILER > > drivers/gpu/drm/omapdrm/omap_gem.c | 198 +++++++++++++++++------------- > drivers/gpu/drm/omapdrm/omap_gem.h | 3 +- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 5 +- > 3 files changed, 116 insertions(+), 90 deletions(-) >