From patchwork Mon Jun 1 14:48:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11582189 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 DFC74913 for ; Mon, 1 Jun 2020 14:49: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 BE588207BC for ; Mon, 1 Jun 2020 14:49:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=emersion.fr header.i=@emersion.fr header.b="DU6t5pbl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE588207BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr 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 C20BC89FFD; Mon, 1 Jun 2020 14:49:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail1.protonmail.ch (mail1.protonmail.ch [185.70.40.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1D9A89FFD for ; Mon, 1 Jun 2020 14:49:07 +0000 (UTC) Date: Mon, 01 Jun 2020 14:48:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1591022945; bh=EQuBvQ7n4G31ddRYEDhSZ+pus1K6EB5qR5vZ5LX6Vns=; h=Date:To:From:Cc:Reply-To:Subject:From; b=DU6t5pblFdffBIfwdrJjVVXHdZPL7LaNaYx7H6nIOPa6rQEah8zS6bqGYSNgojqKW eYfxfPom3CkOP7hmMI6hUP/s7R6oUbP81jeBiKev5oFvdMRodN/Qako3GiJhUqhVG8 b2xfzabd4iMiSrNj4dLjJ1/SGE4aqBm53YmPU1r0= To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm: document how user-space should use link-status Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch 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: , Reply-To: Simon Ser Cc: Manasi Navare Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Describe what a "BAD" link-status means for user-space and how it should handle it. The logic described has been implemented in igt [1]. [1]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/fbe61f529737191d0920521946a575bd55f00fbe Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Manasi Navare Cc: Pekka Paalanen --- drivers/gpu/drm/drm_connector.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index f2b20fd66319..08ba84f9787a 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -994,6 +994,12 @@ static const struct drm_prop_enum_list dp_colorspaces[] = { * after modeset, the kernel driver may set this to "BAD" and issue a * hotplug uevent. Drivers should update this value using * drm_connector_set_link_status_property(). + * + * When user-space receives the hotplug uevent and detects a "BAD" + * link-status, the connector is no longer enabled. The list of available + * modes may have changed. User-space is expected to pick a new mode if + * the current one has disappeared and perform a new modeset with + * link-status set to "GOOD" to re-enable the connector. * non_desktop: * Indicates the output should be ignored for purposes of displaying a * standard desktop environment or console. This is most likely because