From patchwork Fri Oct 9 09:24:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11825445 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 9E4376CA for ; Fri, 9 Oct 2020 09:24:20 +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 6ACB22227E for ; Fri, 9 Oct 2020 09:24:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ACB22227E 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 E9A4B6EC88; Fri, 9 Oct 2020 09:24:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by gabe.freedesktop.org (Postfix) with ESMTPS id 701A76EC88 for ; Fri, 9 Oct 2020 09:24:14 +0000 (UTC) Date: Fri, 09 Oct 2020 09:24:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1602235452; bh=hhjjM31bBIHSfRUZVh8gonhy1p0JGEjI5nhzcZfRsIE=; h=Date:To:From:Cc:Reply-To:Subject:From; b=UqJCJYAkK5wqY8/rdyg9NgSkMxXQmKNye8joAjiTuRopEqTX65dovpnll8VdeUmmu zQlHqTj25ysUPgs9q/3nhPX6FzgKh9dr0vudBrbMIXkMc7qbAPSSFSic1C16MMqU0y WwItYHom9o31b5hk7DVCkPGfbx8juqPFXmHWArd7FQhJNkqphsqbEdVh477kuVz60k +N36QWvLYwdM6pWekvc01uXfVbVJnStD6pLrR4eydxvOfYOSm7yWgy80MB4CK04HYa jNC5dY3Z1JkbbQHliWACBL26ApnjRgHwsxvooY+h83SREUwj6gx9ZDu0epLGa56fFn qJaYkhr3EKJow== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm: document that user-space should avoid parsing EDIDs Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.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 mailout.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: Daniel Vetter , Pekka Paalanen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" User-space should avoid parsing EDIDs for metadata already exposed via other KMS interfaces and properties. For instance, user-space should not try to extract a list of modes from the EDID: the kernel might mutate the mode list (because of link capabilities or quirks for instance). Other metadata not exposed by KMS can be parsed by user-space. This includes for instance monitor identification (make/model/serial) and supported color-spaces. Signed-off-by: Simon Ser Suggested-by: Daniel Vetter Cc: Daniel Vetter Cc: Pekka Paalanen Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Reviewed-by: Pekka Paalanen Acked-by: Daniel Stone --- drivers/gpu/drm/drm_connector.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 717c4e7271b0..00e58fd2d292 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -960,6 +960,10 @@ static const struct drm_prop_enum_list dp_colorspaces[] = { * drm_connector_update_edid_property(), usually after having parsed * the EDID using drm_add_edid_modes(). Userspace cannot change this * property. + * + * User-space should not parse the EDID to obtain information exposed via + * other KMS properties. For instance, user-space should not try to parse + * mode lists from the EDID. * DPMS: * Legacy property for setting the power state of the connector. For atomic * drivers this is only provided for backwards compatibility with existing