From patchwork Wed Nov 18 14:03:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuti Amonkar X-Patchwork-Id: 11916685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DA8EC56201 for ; Thu, 19 Nov 2020 08:31:55 +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 9C44224655 for ; Thu, 19 Nov 2020 08:31:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="JrB8GTb4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="lOclUZOU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C44224655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com 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 10D7B6E507; Thu, 19 Nov 2020 08:31:39 +0000 (UTC) Received: from mx0a-0014ca01.pphosted.com (mx0b-0014ca01.pphosted.com [208.86.201.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 174A26E3D0 for ; Wed, 18 Nov 2020 14:03:59 +0000 (UTC) Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AIE0qrj027668; Wed, 18 Nov 2020 06:03:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=JfXozPlWk+qjEIX6FDgORtm7drmZ/ONGmT4Pzl5cHK0=; b=JrB8GTb4yOrLwOv69Mhn5MGoegHVFj956TU/ADcRgeVQnciAHyfL05Rie025fNznpL5/ s1DO3k5CISrSWWA4Pn8JsZhux2YgOWBsNxy+f5RScfT8Yczou+ZwP9TtElfePZoJrJWN PntxMogiyQthGbydyCWWZmwDD7X4sQAywhXdeBeMchcJYDhZVA+3+ayN8l157uVF/Hmd 5HVJa+efLCm//Y6zwhl3o0jWbmE3AJXpaYR689nx1lyUXRFd2mO+HD1Du9HOUGdPEba8 4dmVTbPKW7ZYvTiDxApegdCGs441wjZX7oHmUnOGDXeIMRvGKY1xXP0ZvmrfE20bNFx7 YA== Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2107.outbound.protection.outlook.com [104.47.55.107]) by mx0b-0014ca01.pphosted.com with ESMTP id 34tbq2yv9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Nov 2020 06:03:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pm/fEOQOvXpfApOyCbvo794Kuxb7m37Yo0w3ugeIEBmEXC8OoS6vnXZhfcrsS2Ho31JXT/bfI4E0fU7OmYLbKvVYpK4rVh1+4KKKKpWzSKt4dz351UOhfkGRzMETVBmXrWY9uwLodtrRTrXS41zoEOYm1Hq/Ehts8cv+VPW02rrqqV2R4MZ93Mp9Lpef57gkhjv5DuytpZxsU+T6rdIuoNDwNzdF2M8jmqP+UspBuTLk9+EU7AfdyDqANJP8iMo3ifMnHaoijnnCcJUQAW+TWOthflWQi4QpdKGY9kqanUNfBsbhVCdZkEIGBJMCnZV6zNzwQydd3LhmVXk+Gd0BGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JfXozPlWk+qjEIX6FDgORtm7drmZ/ONGmT4Pzl5cHK0=; b=E0y+YEgldAWAhvHGO1WQvpi6nHRue/yFMPbO6jt7q3lrkJ/SGVv0bk3CC6RmGsh19ItB8ByhsgoqEW5MlSMCsTI31FWyX2VAcpkGpzB6s3+Guyy0i+4w+bifSW0/ZRjkLJvXMmaZRdilCU8bHiPmWR9EctU7SYpp3J+4h+OSFC5jMuQ3PW/4ZSg88NjM4f9szB6ZfearaAsqMl+h6sXfUcY3n0QUlMDsm5e63l5R/U1jN4PVEsmStNGhXO3F/hqPP5rwLkgnjVVsPuDpdXF6dUZ5g2HPM7UlLGe+4QfKa4CD9sttYU+QuvENmqUfNam6KMQlKXmy5lzR9htcMCH7eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.147) smtp.rcpttodomain=ffwll.ch smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JfXozPlWk+qjEIX6FDgORtm7drmZ/ONGmT4Pzl5cHK0=; b=lOclUZOUhVwIg5FcS8uIR9QAFlyE7LdZWayzv5uJBh70/0CFJw/sJaPHTT7KveSarAT23PZlTaPPvTnTMEt6IINYqr6Z/0TSc6ZTIYIeFxdTGLv4IWPAXRWfIGm3Uofnb2JTVONUjzzDFYBoAWtIfwihOzuUfXVrIP4ELqNr5lY= Received: from DM6PR08CA0034.namprd08.prod.outlook.com (2603:10b6:5:80::47) by DM6PR07MB4700.namprd07.prod.outlook.com (2603:10b6:5:a6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Wed, 18 Nov 2020 14:03:45 +0000 Received: from DM6NAM12FT034.eop-nam12.prod.protection.outlook.com (2603:10b6:5:80:cafe::4) by DM6PR08CA0034.outlook.office365.com (2603:10b6:5:80::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Wed, 18 Nov 2020 14:03:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 158.140.1.147) smtp.mailfrom=cadence.com; ffwll.ch; dkim=none (message not signed) header.d=none;ffwll.ch; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.147 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.147; helo=sjmaillnx1.cadence.com; Received: from sjmaillnx1.cadence.com (158.140.1.147) by DM6NAM12FT034.mail.protection.outlook.com (10.13.178.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.11 via Frontend Transport; Wed, 18 Nov 2020 14:03:45 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3dUq007561 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Wed, 18 Nov 2020 06:03:44 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 18 Nov 2020 15:03:38 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 18 Nov 2020 15:03:38 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3cXT003743; Wed, 18 Nov 2020 15:03:38 +0100 Received: (from yamonkar@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 0AIE3cP6003742; Wed, 18 Nov 2020 15:03:38 +0100 From: Yuti Amonkar To: , , , , , , , , , , Subject: [PATCH v2 1/3] drm: bridge: cdns-mhdp8546: Modify atomic_get_input_bus_format bridge function Date: Wed, 18 Nov 2020 15:03:26 +0100 Message-ID: <1605708208-3692-2-git-send-email-yamonkar@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> References: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0cbf313-cd9b-4b3e-32b2-08d88bcac38c X-MS-TrafficTypeDiagnostic: DM6PR07MB4700: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:334; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nd/s5T6rpZRaLEzKTL4RCZ4Jcek9knyGzCmKLmVAA24d+Js2y9Vjc8F12UNdG2WKIh78mS8bl/4Yt+xAKY3VktibJ12ggymD2pJ13nJHUGS8EOxSrwVMNnaU/IwRQHJKn5dnLWOboANTtWulUs3UWZdeQr3XAmftITJRMbehEz+kE6r2ArF8gANZRR3DjBVNAzGaALWtNR0B2S7BKKyfnyDtzSl0eeJ4XM3ob6n+PtWoGd5G1Ca+dBcAv1uOzvxy3h10sqSR8wTUPumQ/Pg76YgNx8aJ+E2to2JSR4QKorJIqFO4zFRivrY7WNreMC06kWTj5t3xQCNngUnTpMp++TeoWif4cC+9Nt1Ynye1Ja9avEV23Iu/O+QCDlvP35JU/HhzYcT9VVZ9SIwRHMOwukiSqAYYcQtfv8LS3myhl3vZW7GcUrzHzUHJ4u/Dn8vC8kj5AQamy+OS0FZcxIUKzdxi7Ic57MTwnGoZ8GC7C/0= X-Forefront-Antispam-Report: CIP:158.140.1.147; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:sjmaillnx1.cadence.com; PTR:unknown.Cadence.COM; CAT:NONE; SFS:(4636009)(39860400002)(346002)(396003)(376002)(136003)(36092001)(46966005)(7416002)(70586007)(107886003)(186003)(316002)(36906005)(478600001)(42186006)(82310400003)(82740400003)(2616005)(7636003)(356005)(2906002)(47076004)(110136005)(8936002)(4326008)(70206006)(83380400001)(8676002)(54906003)(86362001)(426003)(921005)(336012)(36756003)(5660300002)(6666004)(26005)(83996005)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2020 14:03:45.2075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0cbf313-cd9b-4b3e-32b2-08d88bcac38c X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.147]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT034.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4700 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-18_04:2020-11-17, 2020-11-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011180099 X-Mailman-Approved-At: Thu, 19 Nov 2020 08:31:38 +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: mparab@cadence.com, yamonkar@cadence.com, nsekhar@ti.com, jsarha@ti.com, tomi.valkeinen@ti.com, sjakhade@cadence.com, nikhil.nd@ti.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Modify atomic_get_input_bus_format function to return input formats supported instead of using hardcoded value. Signed-off-by: Yuti Amonkar --- .../drm/bridge/cadence/cdns-mhdp8546-core.c | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index 6beccd2a408e..7c80555ab4ab 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -2078,27 +2078,52 @@ cdns_mhdp_bridge_atomic_reset(struct drm_bridge *bridge) return &cdns_mhdp_state->base; } +#define MAX_INPUT_FORMAT 11 + static u32 *cdns_mhdp_get_input_bus_fmts(struct drm_bridge *bridge, - struct drm_bridge_state *bridge_state, - struct drm_crtc_state *crtc_state, - struct drm_connector_state *conn_state, - u32 output_fmt, - unsigned int *num_input_fmts) -{ + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts) +{ + struct drm_connector *conn = conn_state->connector; + struct drm_display_info *info = &conn->display_info; u32 *input_fmts; - u32 default_bus_format = MEDIA_BUS_FMT_RGB121212_1X36; + unsigned int i = 0; *num_input_fmts = 0; if (output_fmt != MEDIA_BUS_FMT_FIXED) return NULL; - input_fmts = kzalloc(sizeof(*input_fmts), GFP_KERNEL); + input_fmts = kcalloc(MAX_INPUT_FORMAT, + sizeof(*input_fmts), GFP_KERNEL); if (!input_fmts) return NULL; - *num_input_fmts = 1; - input_fmts[0] = default_bus_format; + if (info->color_formats & DRM_COLOR_FORMAT_RGB444) { + input_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24; + input_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30; + input_fmts[i++] = MEDIA_BUS_FMT_RGB121212_1X36; + input_fmts[i++] = MEDIA_BUS_FMT_RGB161616_1X48; + } + + if (info->color_formats & DRM_COLOR_FORMAT_YCRCB444) { + input_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24; + input_fmts[i++] = MEDIA_BUS_FMT_YUV10_1X30; + input_fmts[i++] = MEDIA_BUS_FMT_YUV12_1X36; + input_fmts[i++] = MEDIA_BUS_FMT_YUV16_1X48; + } + + if (info->color_formats & DRM_COLOR_FORMAT_YCRCB422) { + input_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16; + input_fmts[i++] = MEDIA_BUS_FMT_UYVY10_1X20; + input_fmts[i++] = MEDIA_BUS_FMT_UYVY12_1X24; + } + + *num_input_fmts = i; + return input_fmts; } From patchwork Wed Nov 18 14:03:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuti Amonkar X-Patchwork-Id: 11916695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E12BEC63798 for ; Thu, 19 Nov 2020 08:32:06 +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 6D884246B0 for ; Thu, 19 Nov 2020 08:32:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="sKfJOU42"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="Y0Bf/MVC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D884246B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com 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 26A7B6E511; Thu, 19 Nov 2020 08:31:40 +0000 (UTC) Received: from mx0a-0014ca01.pphosted.com (mx0b-0014ca01.pphosted.com [208.86.201.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26D186E40F for ; Wed, 18 Nov 2020 14:03:59 +0000 (UTC) Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AIE0pVX027578; Wed, 18 Nov 2020 06:03:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=HGkZyTQN5KO5I+ROK7uE63kLANw1VTA2FCtBxKornvQ=; b=sKfJOU42KL54ITfQzXGpzgFaUtaoWEj6oU68U1Jd8iLau8JJXdKM92Fd92eN6FvUCAXX u8qG1jHkmtsI1I/K1VMRjzhZ5nCLc1nYi1lbBTalR6YpxZsGJV5xxvZucQdalrCeRvHD NNxq5nDrsYEHUva//HNPLyH6SqFxTSX/P5pjM5wcQdFFrRCrFmfziaYAfSIHneuav5D8 qgZy+7QVIYPaN6mdu185s+jcJ8hhSyCjWGk+shuqkqYSfLbQAiNhfHsy0r7esovK6Iwb g9tBd5cAcLDcy1hBZ8zIeb08kFg7jIHLFEWhh3GxSv2RbznSijOGxjEutHclczj3t4XL MA== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx0b-0014ca01.pphosted.com with ESMTP id 34tbq2yv9k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Nov 2020 06:03:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eAogeLdKaRj1uhebhqKluNJZRnz0YHCBqCitAPuOVqfoG4GexWnl6Uvzm33ymg9/46brU5oAAo5sU6ZA0yZrxu3MXtDkJI57LmtmIwgqMTc1GrUXJ1Yoo7OyyXLWnL0jWuQ5PV33HN5IQuV3zVOIlAj116wnoO9+G8YLFxvXrcu60f8DQ69vyGRwKDynt5+ElE3B+uMkaVGoEag3EGb5Wn0hK+XYTyraOnfoWcdXBaST0VlIfcUyDYpzpdoKuAf3rbgtRtCWtkIikOQ5yuBAfG/QJ05cB6GwZwe1NTX/cOMUVpTTYOSEKY0WXgmjRyI53Yj4YbofV9ss7AhTGR+tJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HGkZyTQN5KO5I+ROK7uE63kLANw1VTA2FCtBxKornvQ=; b=f4jCWRf6mcux+4TFZZzEqr95G16QOUlClwLrvYL0SFaahrbymWoB+uXAYNqsjGSCWzQxqJKqwLCeq3jS3mgxwSU+dG2Y62YxyX+RKtVECOwBBMkwj1Zb0mBJh85sjN6EYp1YYL2erQ8bptZVLcRlpBBiaZiHhgumPAwOu95elaYrC6vvLkzI0lbreTc8YHcuYF8El8bLFIa4TNgCmqDRUYBhpmYngPzo4H67CLWB8KfmivyWWPZaC6jlXPm2I3Q6CA3YddEo5eeTynzAVqZOXyHzO70kWQlzDMrPx4LCLvk/OkKUk0+rWWzPNHgF36fOfeaVVYwmTm5a4piXVZjBOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.147) smtp.rcpttodomain=ffwll.ch smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HGkZyTQN5KO5I+ROK7uE63kLANw1VTA2FCtBxKornvQ=; b=Y0Bf/MVCY208SZviXvIL+Q8oCcnKDreoulDVDEIM09uWhIu04g6BT2yzMwXhwe7HGlWMMs5PuAbHMo56TOdIF0O1OB/1s5shLj2U5TJh/ngF7iLkux156kb9fZ6if6Nu3S6pO0QwmZHCvSrKwCHAbSk+RRiEgmynk90cPafmI/Q= Received: from CO2PR18CA0065.namprd18.prod.outlook.com (2603:10b6:104:2::33) by BY5PR07MB7187.namprd07.prod.outlook.com (2603:10b6:a03:20e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25; Wed, 18 Nov 2020 14:03:46 +0000 Received: from MW2NAM12FT008.eop-nam12.prod.protection.outlook.com (2603:10b6:104:2:cafe::1a) by CO2PR18CA0065.outlook.office365.com (2603:10b6:104:2::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Wed, 18 Nov 2020 14:03:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 158.140.1.147) smtp.mailfrom=cadence.com; ffwll.ch; dkim=none (message not signed) header.d=none;ffwll.ch; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.147 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.147; helo=sjmaillnx1.cadence.com; Received: from sjmaillnx1.cadence.com (158.140.1.147) by MW2NAM12FT008.mail.protection.outlook.com (10.13.180.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.12 via Frontend Transport; Wed, 18 Nov 2020 14:03:46 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3dUr007561 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Wed, 18 Nov 2020 06:03:44 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 18 Nov 2020 15:03:38 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 18 Nov 2020 15:03:38 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3cWF003747; Wed, 18 Nov 2020 15:03:38 +0100 Received: (from yamonkar@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 0AIE3c0K003746; Wed, 18 Nov 2020 15:03:38 +0100 From: Yuti Amonkar To: , , , , , , , , , , Subject: [PATCH v2 2/3] drm: bridge: cdns-mhdp8546: Remove setting of bus format using connector info Date: Wed, 18 Nov 2020 15:03:27 +0100 Message-ID: <1605708208-3692-3-git-send-email-yamonkar@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> References: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00dcb229-203a-45fe-6328-08d88bcac406 X-MS-TrafficTypeDiagnostic: BY5PR07MB7187: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lKOEZY6JYpjJY36Ij5tHZ76ZS5iNbohFpMH9gbN0RAwEL97p9fOC8XyNu5emgzC7MCeiXh7xgJoZgR7JdUMT+O/iZTlYjuVPc/U5j+pAeRm6isjn+TYyL+RujxspSZfFE8gBh2VoP3A16MQ6BV5rDOKN0ILM4fVAbz3z73pPngE9Qr2K6V0R8zZbRlryROCkv9zLXIyBfBv0PEfJlA0Tfw9w+5RUb3/R5La/+xZ4N4sUuspZehTAYYFewrZ+kxAQfhQpMg0sYXlcXcyysegHzjhNnJQ64Zd0O5S2HOTo65Bb55k8ydfGAJr4E1SEWL4Aax+AJ68KwdFDw3hMbGT/w7CanHqTxQJYSousCWgTmqXzrqBXACg3BaWtJztQiwqjZkdazRzsI7tfzzWK/ObLWWV1ceHh4bf2GBz1NsIVWL/qP+nbym8jWSzP0EdoXq4XwYa1hUkcjkRiejNIqn4CDWmIB0Vo7K53vfP+3XK1nT4= X-Forefront-Antispam-Report: CIP:158.140.1.147; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:sjmaillnx1.cadence.com; PTR:unknown.Cadence.COM; CAT:NONE; SFS:(4636009)(136003)(39860400002)(376002)(346002)(396003)(36092001)(46966005)(107886003)(83380400001)(82310400003)(4326008)(47076004)(8676002)(110136005)(26005)(426003)(2616005)(921005)(336012)(356005)(86362001)(7636003)(36756003)(8936002)(6666004)(5660300002)(186003)(82740400003)(2906002)(478600001)(70206006)(42186006)(316002)(70586007)(36906005)(54906003)(7416002)(83996005)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2020 14:03:46.0713 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00dcb229-203a-45fe-6328-08d88bcac406 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.147]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT008.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR07MB7187 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-18_04:2020-11-17, 2020-11-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011180099 X-Mailman-Approved-At: Thu, 19 Nov 2020 08:31:38 +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: mparab@cadence.com, yamonkar@cadence.com, nsekhar@ti.com, jsarha@ti.com, tomi.valkeinen@ti.com, sjakhade@cadence.com, nikhil.nd@ti.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" As we are using bus negotiations for selecting bus format remove the setting of bus format using the connector info structure. Signed-off-by: Yuti Amonkar --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index 7c80555ab4ab..d5e94bd74df1 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -1630,7 +1630,6 @@ static const struct drm_connector_funcs cdns_mhdp_conn_funcs = { static int cdns_mhdp_connector_init(struct cdns_mhdp_device *mhdp) { - u32 bus_format = MEDIA_BUS_FMT_RGB121212_1X36; struct drm_connector *conn = &mhdp->connector; struct drm_bridge *bridge = &mhdp->bridge; int ret; @@ -1651,11 +1650,6 @@ static int cdns_mhdp_connector_init(struct cdns_mhdp_device *mhdp) drm_connector_helper_add(conn, &cdns_mhdp_conn_helper_funcs); - ret = drm_display_info_set_bus_formats(&conn->display_info, - &bus_format, 1); - if (ret) - return ret; - ret = drm_connector_attach_encoder(conn, bridge->encoder); if (ret) { dev_err(mhdp->dev, "Failed to attach connector to encoder\n"); From patchwork Wed Nov 18 14:03:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuti Amonkar X-Patchwork-Id: 11916701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7BECC2D0E4 for ; Thu, 19 Nov 2020 08:32:10 +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 4A163246B0 for ; Thu, 19 Nov 2020 08:32:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="BQnyTCLB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="DYPmZcAZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A163246B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com 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 485686E51B; Thu, 19 Nov 2020 08:31:41 +0000 (UTC) Received: from mx0a-0014ca01.pphosted.com (mx0b-0014ca01.pphosted.com [208.86.201.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 569126E3D0 for ; Wed, 18 Nov 2020 14:04:00 +0000 (UTC) Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AIE0pVY027578; Wed, 18 Nov 2020 06:03:51 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=lPwf5/zU9UTw71hGTKzYrSmfvpQfDZAyRZbrhKFC70s=; b=BQnyTCLBfVTW1o2tAMvsVa8PKFxpCbwqJ8aYmxQTmM+kuGZTgNp0cVEBKJwY6fNyoDk2 k5KsjcCdLlkq/Sp7WOVL2yWxLU5gZXl1A9wxhLhKvd8eyCT1N9mtJND3HcHm8I6dC9W0 f7DttKIi46u5CyS6oY3gih3IPMJLzYBrxktNwTIcpdBoXQrHuFf6NeTvhA8Qkh50iZKK Zs3FRQc8e2sngG9g0bQfNaud4eIn61k7xAf/L+rJSYEA8cBaV/PR1aq6UUBN7UQp7dBP kKpoBBpQ93Wen+xM2lMjhNDbwkDK9PTRvkvPLl2Q5udXOAnONDMA4Qw9Z77s4V2N6oiz Tw== Received: from nam02-bl2-obe.outbound.protection.outlook.com (mail-bl2nam02lp2050.outbound.protection.outlook.com [104.47.38.50]) by mx0b-0014ca01.pphosted.com with ESMTP id 34tbq2yv9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Nov 2020 06:03:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H0K71dt8WE3RnfMctiUR/egwFQclsn/AG0+H77lAOAeXhM1XMjtllZiilif6KvwlWfP8FG5cA9sByF4RhsIjvHGm1xXSbN2kSZE/kULD12NOVZ3+ZVLdO8hLdVFhbcKjqlCUhup/vk8rojMdBeThMqwA0xd4jASKaxpFAyeVwfou72ZoRMhmmAnfTWy8deEpTT4JtSqPXz7GPLh2YdyJOiH9Ecgja7OavCz81vIELmk4e3I1RfFiv0i8avWjdlJY+tXG+dyrfNku3VF+Jv9fdQ73TBi5RFkOwjaCnOKlXW2jU3iydH2rP4i+QauocSFjW9kosGbfITS7exisu8qqXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lPwf5/zU9UTw71hGTKzYrSmfvpQfDZAyRZbrhKFC70s=; b=Mqys6qYW+T/iZqCds0/RpAAc9xXqnZeuy2QrO8thEQ/rG9sa+UXKpF/b09Kb37xXDD8BrBoINXd7eH2LpLA2AV13GvBRsH3QaZamQySFquvSl43vW3+1MCeMf8z9piriD+h3uaZCxDQYhpMuD+aP/4P9lsJhhIPMxqPieHZT6CEbMCZXSMJ/YyG6rgTVompLCNehGl45OH1OHo1+1yo/kLVOfL8t/jyqTyjvfdoAl5x56WGSPyFzPGs7m2RVqJ+JOg960yd5lfKThI4BGyZvAaFv6eLxjMsxBma5ekMA3WMrsBWE2PFAXoez8tLRRMZ5428/bgnqvzhizOywaJKs6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.147) smtp.rcpttodomain=ffwll.ch smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lPwf5/zU9UTw71hGTKzYrSmfvpQfDZAyRZbrhKFC70s=; b=DYPmZcAZYG7ITrbDIiXNStG3qtmMnaN6Uu1IAZQtUK9eXC9cRHCi+RDyJz97eh7sV70H9MlvsjzGckoB38UUoMVsrp2rvpYAORcts8Ffh7ro/9YpSiEM7cDeRxrapPuh6ikXqxs13DgMLXEmajCP16NHpGgqlQ63YufHYm3ucXU= Received: from DM5PR2201CA0013.namprd22.prod.outlook.com (2603:10b6:4:14::23) by SN6PR07MB8208.namprd07.prod.outlook.com (2603:10b6:805:e2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25; Wed, 18 Nov 2020 14:03:46 +0000 Received: from DM6NAM12FT064.eop-nam12.prod.protection.outlook.com (2603:10b6:4:14:cafe::98) by DM5PR2201CA0013.outlook.office365.com (2603:10b6:4:14::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Wed, 18 Nov 2020 14:03:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 158.140.1.147) smtp.mailfrom=cadence.com; ffwll.ch; dkim=none (message not signed) header.d=none;ffwll.ch; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.147 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.147; helo=sjmaillnx1.cadence.com; Received: from sjmaillnx1.cadence.com (158.140.1.147) by DM6NAM12FT064.mail.protection.outlook.com (10.13.178.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.11 via Frontend Transport; Wed, 18 Nov 2020 14:03:46 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3dUs007561 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Wed, 18 Nov 2020 06:03:45 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 18 Nov 2020 15:03:39 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 18 Nov 2020 15:03:39 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 0AIE3dms003751; Wed, 18 Nov 2020 15:03:39 +0100 Received: (from yamonkar@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 0AIE3cft003750; Wed, 18 Nov 2020 15:03:38 +0100 From: Yuti Amonkar To: , , , , , , , , , , Subject: [PATCH v2 3/3] drm: bridge: cdns-mhdp8546: Retrieve the pixel format and bpc based on bus format Date: Wed, 18 Nov 2020 15:03:28 +0100 Message-ID: <1605708208-3692-4-git-send-email-yamonkar@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> References: <1605708208-3692-1-git-send-email-yamonkar@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4279eca-da06-4c0b-ed2d-08d88bcac445 X-MS-TrafficTypeDiagnostic: SN6PR07MB8208: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:148; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cvm90xGuAhBfKI1Lt2tPBe+KIMpmAd+egrzubP9iUoldghBv5npDLZZtXvmZysgPC4/G4h0Nir0qs+9BWyoWLpnlVqgOlmce/5zcOIs6zA4J1LLwRTAgWUbAapUhcZJS5peZMIbjtpc/+i2xjf7Kq7R8rNgSsy7Sinb0WBPgK5slLYgpbMRACjJlEgX8HfrL5YOpYgrLpqcgpKzj4c3T3Dg9NIDkWQtr3U1CORXVcST+Ah9rP+UlsoBzLhj2JIqwe0SEzJDL/S6kn3oJxeCrDGkm0Wi8spN6vjVw/9zODMh5E6X9x3FMMoYzQxhAuj+Tk3D838k6PJ1d8ZThD1WS9VcGxEioAT7NpIHmugQmorKC6u54fGP0tjVb2GtOx/1PK+YYGM2wveTqtIC1d3CIwYZQiOQuz/6IMPfauVoRXs4DEvsJc9sQ6H3c/7PbFW/d/VkCsn6dSYMMZ7n4SZCeFo/kJSMElNUcC/p0gwbpWw3/VklMmNqpyweS3d8NGnI8zOFQ0YkOJ0Wn/cvZ7T8XXQ== X-Forefront-Antispam-Report: CIP:158.140.1.147; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:sjmaillnx1.cadence.com; PTR:unknown.Cadence.COM; CAT:NONE; SFS:(4636009)(396003)(346002)(376002)(136003)(39860400002)(36092001)(46966005)(2616005)(5660300002)(336012)(47076004)(82740400003)(36756003)(6666004)(8936002)(7416002)(82310400003)(86362001)(356005)(7636003)(8676002)(426003)(110136005)(54906003)(26005)(186003)(478600001)(42186006)(4326008)(107886003)(36906005)(2906002)(83380400001)(70586007)(70206006)(921005)(316002)(2101003)(83996005)(358055004); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2020 14:03:46.4497 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4279eca-da06-4c0b-ed2d-08d88bcac445 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.147]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT064.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB8208 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-18_04:2020-11-17, 2020-11-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011180099 X-Mailman-Approved-At: Thu, 19 Nov 2020 08:31:38 +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: mparab@cadence.com, yamonkar@cadence.com, nsekhar@ti.com, jsarha@ti.com, tomi.valkeinen@ti.com, sjakhade@cadence.com, nikhil.nd@ti.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Get the pixel format and bpc based on the output bus format negotiated instead of hardcoding the values. Signed-off-by: Yuti Amonkar --- .../drm/bridge/cadence/cdns-mhdp8546-core.c | 82 +++++++++++++++---- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index d5e94bd74df1..e1f4bbd09816 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -1512,24 +1512,8 @@ static int cdns_mhdp_get_modes(struct drm_connector *connector) drm_connector_update_edid_property(connector, edid); num_modes = drm_add_edid_modes(connector, edid); - kfree(edid); - /* - * HACK: Warn about unsupported display formats until we deal - * with them correctly. - */ - if (connector->display_info.color_formats && - !(connector->display_info.color_formats & - mhdp->display_fmt.color_format)) - dev_warn(mhdp->dev, - "%s: No supported color_format found (0x%08x)\n", - __func__, connector->display_info.color_formats); - - if (connector->display_info.bpc && - connector->display_info.bpc < mhdp->display_fmt.bpc) - dev_warn(mhdp->dev, "%s: Display bpc only %d < %d\n", - __func__, connector->display_info.bpc, - mhdp->display_fmt.bpc); + kfree(edid); return num_modes; } @@ -1689,6 +1673,66 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge, return 0; } +static void cdns_mhdp_get_display_fmt(struct cdns_mhdp_device *mhdp, + struct drm_bridge_state *state) +{ + u32 bus_fmt, bpc, pxlfmt; + + bus_fmt = state->output_bus_cfg.format; + switch (bus_fmt) { + case MEDIA_BUS_FMT_RGB161616_1X48: + pxlfmt = DRM_COLOR_FORMAT_RGB444; + bpc = 16; + break; + case MEDIA_BUS_FMT_YUV16_1X48: + pxlfmt = DRM_COLOR_FORMAT_YCRCB444; + bpc = 16; + break; + case MEDIA_BUS_FMT_RGB121212_1X36: + pxlfmt = DRM_COLOR_FORMAT_RGB444; + bpc = 12; + break; + case MEDIA_BUS_FMT_UYVY12_1X24: + pxlfmt = DRM_COLOR_FORMAT_YCRCB422; + bpc = 12; + break; + case MEDIA_BUS_FMT_YUV12_1X36: + pxlfmt = DRM_COLOR_FORMAT_YCRCB444; + bpc = 12; + break; + case MEDIA_BUS_FMT_RGB101010_1X30: + pxlfmt = DRM_COLOR_FORMAT_RGB444; + bpc = 10; + break; + case MEDIA_BUS_FMT_UYVY10_1X20: + pxlfmt = DRM_COLOR_FORMAT_YCRCB422; + bpc = 10; + break; + case MEDIA_BUS_FMT_YUV10_1X30: + pxlfmt = DRM_COLOR_FORMAT_YCRCB444; + bpc = 10; + break; + case MEDIA_BUS_FMT_RGB888_1X24: + pxlfmt = DRM_COLOR_FORMAT_RGB444; + bpc = 8; + break; + case MEDIA_BUS_FMT_UYVY8_1X16: + pxlfmt = DRM_COLOR_FORMAT_YCRCB422; + bpc = 8; + break; + case MEDIA_BUS_FMT_YUV8_1X24: + pxlfmt = DRM_COLOR_FORMAT_YCRCB444; + bpc = 8; + break; + default: + pxlfmt = DRM_COLOR_FORMAT_RGB444; + bpc = 8; + } + + mhdp->display_fmt.color_format = pxlfmt; + mhdp->display_fmt.bpc = bpc; +} + static void cdns_mhdp_configure_video(struct cdns_mhdp_device *mhdp, const struct drm_display_mode *mode) { @@ -2129,6 +2173,8 @@ static int cdns_mhdp_atomic_check(struct drm_bridge *bridge, struct cdns_mhdp_device *mhdp = bridge_to_mhdp(bridge); const struct drm_display_mode *mode = &crtc_state->adjusted_mode; + cdns_mhdp_get_display_fmt(mhdp, bridge_state); + mutex_lock(&mhdp->link_mutex); if (!cdns_mhdp_bandwidth_ok(mhdp, mode, mhdp->link.num_lanes, @@ -2456,7 +2502,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev) mhdp->link.rate = mhdp->host.link_rate; mhdp->link.num_lanes = mhdp->host.lanes_cnt; - /* The only currently supported format */ + /* Initialize color format bpc and y_only to default values*/ mhdp->display_fmt.y_only = false; mhdp->display_fmt.color_format = DRM_COLOR_FORMAT_RGB444; mhdp->display_fmt.bpc = 8;