From patchwork Thu Feb 12 23:41:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paauwe, Bob J" X-Patchwork-Id: 5822541 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 59FE7BF440 for ; Thu, 12 Feb 2015 23:41:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CD5020266 for ; Thu, 12 Feb 2015 23:41:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9B55420260 for ; Thu, 12 Feb 2015 23:41:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CEF26E785; Thu, 12 Feb 2015 15:41:07 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 85FBF6E782 for ; Thu, 12 Feb 2015 15:41:05 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 12 Feb 2015 15:41:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,567,1418112000"; d="scan'208";a="665697124" Received: from bpaauwe-desk.fm.intel.com ([10.1.134.218]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2015 15:41:03 -0800 From: Bob Paauwe To: intel-gfx Date: Thu, 12 Feb 2015 15:41:29 -0800 Message-Id: <1423784498-11272-4-git-send-email-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423784498-11272-1-git-send-email-bob.j.paauwe@intel.com> References: <1423784498-11272-1-git-send-email-bob.j.paauwe@intel.com> Subject: [Intel-gfx] [RFC 03/12] drm/i915/config: Add init-time configuration of bits per color. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Allow the init-time configuration to specify the bits per color value that gets used if bits per color is not present in EDID data (or if EDID is not present). Signed-off-by: Bob Paauwe --- drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index de6de83..347dbad 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9957,6 +9957,20 @@ connected_sink_compute_bpp(struct intel_connector *connector, connector->base.base.id, connector->base.name); + /* If !bpc then see if one was specified in the static configuation */ + if (connector->base.display_info.bpc == 0) { + /* + * This is making the assumption that the static configuration + * will use the names defined in the intel_output_name() + * function to identify the output. + */ + intel_config_get_integer(to_i915(connector->base.dev), + CFG_CONNECTOR, + intel_output_name(connector), + "bits_per_color", + &connector->base.display_info.bpc); + } + /* Don't use an invalid EDID bpc value */ if (connector->base.display_info.bpc && connector->base.display_info.bpc * 3 < bpp) {