From patchwork Tue Jul 14 07:13:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11661853 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 9FCEC138C for ; Tue, 14 Jul 2020 07:15:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 791492076D for ; Tue, 14 Jul 2020 07:15:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kaCk/HKs"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pPUI4kqR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 791492076D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ANjWcrgmX7GYWsA0sjDC3uxyBj5+ScohmGCwCPeEec0=; b=kaCk/HKs3OrRM/UvVga1zx6YX uoBfWrZmJdOn735fHtQuoYdWSA91/MgUt85WZnq5cqj1aCGaxuCmurLzaQzyw8ru1netvoRs+d2Fo PxgcqxI8QqM55kj55NB8IHn+gYTf3DXnNEA69jIoc+sj6ECMqajmPfHYW1fLVL5ai2HtiIGrzH5dt o94XLn0pLzJEHihrHo54xN7hi9F+xQ5J10y6ZoR8b7YeyoaYyq5X9zGax9e264dyJ5M2KG9UfGHAu LJQJprs+NXfHEPGE35OkPq+qJ4OCGcZB8GNDNHkTFozWFTZIuLfj8CU+h/oAr6YaHFhSM4rC3Xw5U Inb/XQJ8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvF8K-0002RK-Rt; Tue, 14 Jul 2020 07:13:44 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvF7x-0002I6-0h for linux-arm-kernel@lists.infradead.org; Tue, 14 Jul 2020 07:13:24 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.194.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A236422227; Tue, 14 Jul 2020 07:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594710799; bh=YiVWckYXZobeNaSRkUj8azBJxqyMKc8YEr8QUsXFDdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pPUI4kqRSARdAvLmGOuFhpE0+TwvUrgdGV5zoluw7dB4jMnbpdwOyWHl6ni2MDtIU zibtyLk+sEY8qdNgniqRgz0jDnhq1F8gEZ5FU8cZ/255xX8zfgMyAeAwl2Mpfp/py3 mIgoeOwFEXDJijHL+pJwF8QkP8OK82SFgkfFbUMc= Received: by wens.tw (Postfix, from userid 1000) id F23B05FCE5; Tue, 14 Jul 2020 15:13:13 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Sam Ravnborg , Thierry Reding , David Airlie , Daniel Vetter Subject: [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi Date: Tue, 14 Jul 2020 15:13:02 +0800 Message-Id: <20200714071305.18492-3-wens@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714071305.18492-1-wens@kernel.org> References: <20200714071305.18492-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_031321_314886_9D5F30D3 X-CRM114-Status: GOOD ( 11.86 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Siarhei Siamashka Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai Now that the device tree binding for panel-dpi has the "bits-per-color" property, parse its value and set bpc in the panel description to the given value. This would allow encoders to detect less-than-8-bits color depth and employ color dithering if possible. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 13a9df44f781..0765bfa54b7a 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -433,6 +433,7 @@ static int panel_dpi_probe(struct device *dev, of_property_read_u32(np, "width-mm", &desc->size.width); of_property_read_u32(np, "height-mm", &desc->size.height); + of_property_read_u32(np, "bits-per-color", &desc->bpc); /* Extract bus_flags from display_timing */ bus_flags = 0;