From patchwork Tue Sep 15 12:38:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11776759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE56714B7 for ; Tue, 15 Sep 2020 14:38:44 +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 B2B0B206A4 for ; Tue, 15 Sep 2020 14:38:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="MAe072Mn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2B0B206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=crapouillou.net 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 033C66E32B; Tue, 15 Sep 2020 14:38:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from crapouillou.net (crapouillou.net [89.234.176.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id C92006E239 for ; Tue, 15 Sep 2020 12:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1600173511; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=5k3SI0i4lxTO6Wjvdny6VfQmiflb4xroZDyrQUaQu38=; b=MAe072MnmRc0bo/M+K3jH+OSnVJCwIj6qEq7Pm7jJMvrnoZB5G7UlNAQVo4stT/qlL0yNv HbUcp4hWjJRG0pHAY/tGd61ORRmhKPFw/96/RtSkRlKkpjTxxlWo94HNfUCe4UuLw0lvUP QmGzvs8evBkPScC/uMUQbolID43WggY= From: Paul Cercueil To: David Airlie , Daniel Vetter Subject: [PATCH 0/3] Small improvements to ingenic-drm Date: Tue, 15 Sep 2020 14:38:15 +0200 Message-Id: <20200915123818.13272-1-paul@crapouillou.net> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 15 Sep 2020 14:38:31 +0000 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: Paul Cercueil , od@zcrc.me, Sam Ravnborg , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Here are three improvements to the ingenic-drm driver. Patch 1 adds 30-bit RGB support for the SoCs that support it. Not much to see here. Patch 2 is here to allow the pixel clock to be re-set when the SoC's main PLL changes, which can happen at any time. We get a callback before and after the PLL clock rate is changed, which allows the ingenic-drm driver to synchronize the clock rate update with vblank. The synchronization mechanism is implemented with a mutex. I am not sure it is the best solution, there may be something better/simpler to do here, but in practice it works just fine. Patch 3 adds support for using a reserved memory area as storage space for GEM buffers. On memory-constrained devices, it is hard to find contiguous space even for a small 320x240 buffer, and sometimes dumb buffer allocation from userspace fails with -ENOMEM. Using a reserved memory area makes sure that there will always be space for our GEM buffers (provided they fit in the memory area). Cheers, -Paul Paul Cercueil (3): drm/ingenic: Add support for 30-bit modes drm/ingenic: Reset pixclock rate when parent clock rate changes drm/ingenic: Add support for reserved memory drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 109 +++++++++++++++++++--- drivers/gpu/drm/ingenic/ingenic-drm.h | 1 + 2 files changed, 99 insertions(+), 11 deletions(-)