Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1533333pxb; Wed, 2 Feb 2022 07:07:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxFAwSJD+HdIWio9HSvklga5PXEUxi+dWkwCWFNvtXa9V4YH0/HiKIgVoFTYzTfSmEEyuA X-Received: by 2002:a17:906:794f:: with SMTP id l15mr26345746ejo.75.1643814451033; Wed, 02 Feb 2022 07:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643814451; cv=none; d=google.com; s=arc-20160816; b=L0Rq/GAJ3QO0sjXPgLaxN5jYrZGYll9nvlRK9DLgNKhGaG7EoUK49DhAgrK6HAJcGB qYj2V+s1Hs/wML71l398IAcOq4mfr3fWnbiejAItKFB/YpoToM9OlykWoGdC93NGSQxg qYagXhOQ6zYyZgTvWvsEf3cBBm/ZoLzmL9mAzjw92vezE3zFXtsbyoNWVeSzVg7AI64s z5vZEOULWnP46lKP0/MBKvatxDRbd71xBrEhAdmxAHu5MI2OObh7LMFUQ9OEBR/Um8Yw 3GZtn8b85JFd2QLGbZQRCV/F4y3PwAfEtxGu3mZXMgZ6KBHOUBjUvwlkN/tqw5iou/JI nH9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=HCuPWo35iIHW6bwAsEpQu9KIym1ffHCR2MBVlEBOvsc=; b=LqFnWzz1Nq5IwMWzUW0/jyzChuDCgYzmd16sfigvvWCTmGa0vD7ShO1o7BGiqh+8ZA W8jYMejFHlpTgoPlMUuswAYTQUbRlGkV+wwTHSFJ0UzCCWNDl1q8dr9D/1zm3/L8nATi R9g/C7eEHHCj0RQX22l6vh+wFCnWRwNpVre9Vuqy/fyKdwH4/S+k6UBg+dSjbDlL/v56 SNgv6LdDBigsE445tp5oeBQ5zZNNpB6tQHE6Jsh1VDxwEOSaYiuE+8UMTWL+lkIvX4WT nOEHOcoCHKd53UhITIMJverDmIvb2Zfv2rGc5gaxb1+lmeBark/4oj5AKx4u0KWP9ZVk Lumw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tronnes.org header.s=ds202112 header.b=I9DJhd2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16si10774240ejk.169.2022.02.02.07.07.03; Wed, 02 Feb 2022 07:07:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@tronnes.org header.s=ds202112 header.b=I9DJhd2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238274AbiBAM6Z (ORCPT + 99 others); Tue, 1 Feb 2022 07:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233789AbiBAM6Y (ORCPT ); Tue, 1 Feb 2022 07:58:24 -0500 Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A291C061714; Tue, 1 Feb 2022 04:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org ; s=ds202112; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HCuPWo35iIHW6bwAsEpQu9KIym1ffHCR2MBVlEBOvsc=; b=I9DJhd2nWqYJk96O9DFM5j9ogj Q6xUhXwDUUvPgPtN1A4nVnzXAK2P7UbBcG2pQI9b4XFLRdzVQ9rMpnXv39ep7R4wenyhb6NMeK702 /MSYUEj17cv70b9KcKZQv6C+eHG3XL5LQb0F54nBYwkW7B0PSHMGMQjcjvva8Fxda/uucp9ohnNXo LyhAsBru/gD8+phe8VBd/KehESFmYxKKBAPD8tXsuBEjIic3PFJJtUpMh1rOXsfYerCi7YsCouH1L hxLtBX0M5hI/bqQWFKUb7kj+ntV1IUQsN9kaIwYi9yEECUB4QNKQNfPBQOOrDJ5jWSKc3Ec5zHcNu y0y5Q8eg==; Received: from [2a01:799:95e:a400:5d05:6ef3:cded:ad3] (port=53808) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEsjk-0001CN-9z; Tue, 01 Feb 2022 13:58:20 +0100 Message-ID: <4d9a56a7-da25-b411-61cc-372c6fa9011d@tronnes.org> Date: Tue, 1 Feb 2022 13:58:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 1/4] drm: Add I2C connector type To: Sam Ravnborg , Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Geert Uytterhoeven , Maxime Ripard , Andy Shevchenko , Emil Velikov References: <20220131201225.2324984-1-javierm@redhat.com> <20220131201225.2324984-2-javierm@redhat.com> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 31.01.2022 21.52, skrev Sam Ravnborg: > On Mon, Jan 31, 2022 at 09:12:21PM +0100, Javier Martinez Canillas wrote: >> There isn't a connector type for display controllers accesed through I2C, >> most drivers use DRM_MODE_CONNECTOR_Unknown or DRM_MODE_CONNECTOR_VIRTUAL. >> >> Add an I2C connector type to match the actual connector. >> >> As Noralf Trønnes mentions in commit fc06bf1d76d6 ("drm: Add SPI connector >> type"), user-space should be able to cope with a connector type that does >> not yet understand. >> It turned out that I wasn't entirely correct here, mpv didn't cope with unknown types. In the PR to add support Emil Velikov wondered if libdrm should handle these connector names: https://github.com/mpv-player/mpv/pull/8989#issuecomment-879187711 >> Tested with `modetest -M ssd1307 -c` and shows the connector as unknown-1. > I had expected unknown-21?? > >> >> Signed-off-by: Javier Martinez Canillas > Reviewed-by: Sam Ravnborg Sam, didn't you and Laurent discuss adding DRM_MODE_CONNECTOR_PANEL for such a use case? If someone adds parallel bus support to the MIPI DBI helper, there will be one more connector type (I wonder what that one will be called). Noralf. >> --- >> >> drivers/gpu/drm/drm_connector.c | 1 + >> include/uapi/drm/drm_mode.h | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c >> index a50c82bc2b2f..975a7525a508 100644 >> --- a/drivers/gpu/drm/drm_connector.c >> +++ b/drivers/gpu/drm/drm_connector.c >> @@ -105,6 +105,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { >> { DRM_MODE_CONNECTOR_WRITEBACK, "Writeback" }, >> { DRM_MODE_CONNECTOR_SPI, "SPI" }, >> { DRM_MODE_CONNECTOR_USB, "USB" }, >> + { DRM_MODE_CONNECTOR_I2C, "I2C" }, >> }; >> >> void drm_connector_ida_init(void) >> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h >> index e1e351682872..d6d6288242db 100644 >> --- a/include/uapi/drm/drm_mode.h >> +++ b/include/uapi/drm/drm_mode.h >> @@ -421,6 +421,7 @@ enum drm_mode_subconnector { >> #define DRM_MODE_CONNECTOR_WRITEBACK 18 >> #define DRM_MODE_CONNECTOR_SPI 19 >> #define DRM_MODE_CONNECTOR_USB 20 >> +#define DRM_MODE_CONNECTOR_I2C 21 >> >> /** >> * struct drm_mode_get_connector - Get connector metadata. >> -- >> 2.34.1