Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5578196pxb; Mon, 28 Mar 2022 14:28:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6AvpRjVTJP3gn/lkfKwkzeuIIbiRdSr0TqBvbNHaPHGDfJnjP0T3XtAxgh3kCXlWK4TOX X-Received: by 2002:a05:6870:9594:b0:da:b3f:2b1c with SMTP id k20-20020a056870959400b000da0b3f2b1cmr593723oao.187.1648502917346; Mon, 28 Mar 2022 14:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648502917; cv=none; d=google.com; s=arc-20160816; b=iruVseLQru1eV8GVciMKyV2KNxrP2n0wDecCJo7Kge1gLqqgBWkyR3aW7Bli0DgKla Heb4+DFaUXdnm3dDyU32jTZhuxn2iTxCuxYkxzXF6WQCyeYNp49D/5aP2EYh3VA231fQ QGNoW8gkD5aU/UAAokVd1B7j0f7/RcYuDLh5vw56V+IJkrH5ruZ9SCJ9Zfy9y0sKXmLs On8+kyU3IbIg9VBBGvdvSWMRq1XywFYGj5O+5WGjEu8pXNg+WrrEnxX4ly9XIxLOjPxo BvrIQwraHD39Gj/PuLbidKpqHnG6f4jJd6YUKDUht7eoUJjKjBlZ5HWJWBna80NehzM/ yj1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=130Z5sMGAeIMQZpEg9q1thx+TXpcBm464oIO7yvbsMA=; b=Clf0NoaYKQHzhBQSc2tIwN/nvUye5s5pQpFgWQItnvKPwQFlgfn7e/f9kvTi9MGwb4 9xZ7yAD6AbAqbntFPYfYh/w/0jv3tTTnqvunrY84iroFRVlkXAWtBXS4oYgxWRHcHMnP xDjnqyA++QIVjsMAb9e4ZwNOYg2p2JWvXYY1mBUfKNFgAsziaScrJBvb3q1xB6x62Eod MVK9vg/OyizP9dq9ifUCNsZWQzGDNrKarg4qcenLBZcZI7n1qVrE418y6n/ieIBwdAEY qZn4CtfpKp3U86HtacAC7b/KkTkqJPC8Jv2fhkT+XBsrJmjl9B954cZm5U5AK3YT2xtE 43Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZBJbMRU4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a20-20020a544e14000000b002f73f0e847fsi7291492oiy.23.2022.03.28.14.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:28:37 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZBJbMRU4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2089A37BC4; Mon, 28 Mar 2022 14:12:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239916AbiC1JsI (ORCPT + 99 others); Mon, 28 Mar 2022 05:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239936AbiC1JsC (ORCPT ); Mon, 28 Mar 2022 05:48:02 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00A7553A55; Mon, 28 Mar 2022 02:46:21 -0700 (PDT) Received: from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 383629BC; Mon, 28 Mar 2022 11:46:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648460779; bh=pcwCelIgg5PfKrL30CLzfV5FkRHuZw4RuC17Tbggats=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZBJbMRU4Y2a2og6ngrKoRpzry4+v/5N549nTM1Xdtqg3UfXJf9eYErOFhydcgP30K wutgdrbnwEK147LiLJI6GH4JPZ/tNhHawcw6jKx+7bOGA0IOznz82K0nIjfaEvROS+ xZT70vs6Sq92F1DQfjSa4ZVufV0FDj0JTJlF/nCs= Message-ID: Date: Mon, 28 Mar 2022 12:46:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 0/3] drm: omapdrm: Fix excessive GEM buffers DMM/CMA usage Content-Language: en-US To: Ivaylo Dimitrov Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, merlijn@wizzup.org, tony@atomide.com, airlied@linux.ie, daniel@ffwll.ch References: <1642587791-13222-1-git-send-email-ivo.g.dimitrov.75@gmail.com> From: Tomi Valkeinen 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-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, On 19/01/2022 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(-) > I have pushed this to drm-misc-next. Tomi