From patchwork Fri Jun 20 01:18:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?St=C3=A9phane_Marchesin?= X-Patchwork-Id: 4386651 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 468159F26E for ; Fri, 20 Jun 2014 01:18:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BC5B203A9 for ; Fri, 20 Jun 2014 01:18:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 93048203A1 for ; Fri, 20 Jun 2014 01:18:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF3226E95F; Thu, 19 Jun 2014 18:18:37 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by gabe.freedesktop.org (Postfix) with ESMTP id E24346E95F for ; Thu, 19 Jun 2014 18:18:36 -0700 (PDT) Received: by mail-pa0-f48.google.com with SMTP id et14so2484278pad.7 for ; Thu, 19 Jun 2014 18:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=McKfeAikcnClFsFQsdervkRnlq0+g3dtj5ifzSwfNVQ=; b=dQNQGLw7jxPjbM7K3N/gzNRKVKj/Mjr3Dn2ATwoMcdtcgMW3k9SC+7jTRyAySSZiUv R/OEKiZxFucuhWLYUvaEBgkaRsl8aR+KXsvrgLfHHxctZ5kBKBHi81LymQfn1BQsGfcz F2tj79Dt9Pzo6LGwrXWnmZ41u9YxltgLQW/I4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=McKfeAikcnClFsFQsdervkRnlq0+g3dtj5ifzSwfNVQ=; b=jQWCrIJl5+Y7FQ+IDzM+wLb8iWHNvC5sDuFaxJAMpMxWcVBEblJcK5swLdb9PpQAqt ebY8tPCO4jA+zI0sNS18dIiljPQSbpjaft7RZ4D/7P+KoWzIkoYmb4OnFkINZO+o75a2 GUXjYzoC/ISfRNOZ6Hxal/ZMWvxg4P7pOEp0aCH+RbGwrh8Q4H56WtZEe5gehvVQ3Dkp HMMhwlOPslhCzKLQkQxkXeV4xDId7I/cOwYrzyM2+Et+N3PtCmz+wq0lg1Slb18Fu2st 4HqW64QhS53TvcqoU5A8NdKiyamm2l76iVkbhC/FX63HJr1hKxguAbp+iQZ4qHjpXAXP kq/Q== X-Gm-Message-State: ALoCoQntyEwR1KxNFJM2pb1fJXNFPQB9+ztkFvmeRxDddx5Ar8XYwFYPojkHxfpHur3xWPeru9iI X-Received: by 10.66.118.71 with SMTP id kk7mr193110pab.147.1403227116754; Thu, 19 Jun 2014 18:18:36 -0700 (PDT) Received: from localhost ([2620:0:1000:1b01:82c1:6eff:fef8:b068]) by mx.google.com with ESMTPSA id ci4sm10592475pbb.50.2014.06.19.18.18.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Jun 2014 18:18:35 -0700 (PDT) From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/panel: panel-simple - Add support for bpc Date: Thu, 19 Jun 2014 18:18:28 -0700 Message-Id: <1403227109-1661-2-git-send-email-marcheu@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 In-Reply-To: <1403227109-1661-1-git-send-email-marcheu@chromium.org> References: <1403227109-1661-1-git-send-email-marcheu@chromium.org> MIME-Version: 1.0 Cc: =?UTF-8?q?St=C3=A9phane=20Marchesin?= , treding@nvidia.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP bpc is provided by the EDID normally, but if we're using drm_panel, we need to store it somewhere. So we add a drm_panel entry for it. Signed-off-by: Stéphane Marchesin --- drivers/gpu/drm/panel/panel-simple.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a251361..1f5fa46 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -37,6 +37,8 @@ struct panel_desc { const struct drm_display_mode *modes; unsigned int num_modes; + unsigned int bpc; + struct { unsigned int width; unsigned int height; @@ -87,6 +89,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) num++; } + connector->display_info.bpc = panel->desc->bpc; connector->display_info.width_mm = panel->desc->size.width; connector->display_info.height_mm = panel->desc->size.height; @@ -285,6 +288,7 @@ static const struct drm_display_mode auo_b101aw03_mode = { static const struct panel_desc auo_b101aw03 = { .modes = &auo_b101aw03_mode, .num_modes = 1, + .bpc = 6, .size = { .width = 223, .height = 125, @@ -307,6 +311,7 @@ static const struct drm_display_mode auo_b133xtn01_mode = { static const struct panel_desc auo_b133xtn01 = { .modes = &auo_b133xtn01_mode, .num_modes = 1, + .bpc = 6, .size = { .width = 293, .height = 165, @@ -329,6 +334,7 @@ static const struct drm_display_mode chunghwa_claa101wa01a_mode = { static const struct panel_desc chunghwa_claa101wa01a = { .modes = &chunghwa_claa101wa01a_mode, .num_modes = 1, + .bpc = 6, .size = { .width = 220, .height = 120, @@ -351,6 +357,7 @@ static const struct drm_display_mode chunghwa_claa101wb01_mode = { static const struct panel_desc chunghwa_claa101wb01 = { .modes = &chunghwa_claa101wb01_mode, .num_modes = 1, + .bpc = 6, .size = { .width = 223, .height = 125, @@ -419,6 +426,7 @@ static const struct drm_display_mode lg_lp129qe_mode = { static const struct panel_desc lg_lp129qe = { .modes = &lg_lp129qe_mode, .num_modes = 1, + .bpc = 8, .size = { .width = 272, .height = 181, @@ -441,6 +449,7 @@ static const struct drm_display_mode samsung_ltn101nt05_mode = { static const struct panel_desc samsung_ltn101nt05 = { .modes = &samsung_ltn101nt05_mode, .num_modes = 1, + .bpc = 6, .size = { .width = 1024, .height = 600,