Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6247236iob; Tue, 10 May 2022 13:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxSrZy34zSlIiu4IdxwZ7Lc8WNwZXgBpNfi5H9K5UbHXymnAQ0wCy4VUAWK4q/RsUR1RQ5 X-Received: by 2002:a17:906:60c2:b0:6e7:681e:b4b7 with SMTP id f2-20020a17090660c200b006e7681eb4b7mr21761392ejk.130.1652216062151; Tue, 10 May 2022 13:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652216062; cv=none; d=google.com; s=arc-20160816; b=uNqvJIpWLS/ljiuATLrOxKeCYxbtgtceP8WbhWVjWMlPBVu8nuxcOi5m0SzzfPsykh oreTzY7ru3hP3ys1HwD8zx7vzcFYYIzYQm9zPC8agSriUWyqrc4FfiL4eAtOQTmREZaR IippzONDlhVbarvKjOILGaUqNASj4zHvb+Tw5PsJbTx9NCx1jC6bqjilP4NrjOZivngk bGW4Z1dn+t5PqMpS0Onit19RXvT4WJ98qzlu6Gd2XgLKoC3MHsg+GGI/Fm6rieNINZp7 SRT+rJuEGucUJz21q+RmJyCBXhVnm9YET4qA7Bd/md0KhSTdZ/N3bsV09fi9DgoYua5k ynDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=/xXStdS/6Ecb3QM+NfwKwg0qrP8dEo54D+TLTJCNtQU=; b=fZYzcSeTH46dnCnMmLHO0DSZseDTSsGBb4o97OQAnC08tGtbTTm32FvdM9IirkdvVT w5d6ajTxCq7Ru92/SD7L0RsxmhpEj1+Dicdj2FyCXdGjjBT/YFpZ1+c38R7W1T2uZJT2 1WQ+GYBQ2M+2gBF2P/kCcZ17VPyHPO3dd0cX1FFGxNlprvEheXPXl65Id4cgN/RLwmg5 DEAgudLIH3b/KbyA5oeIFjJzLRNYcudZz2EDUtTH7b1Qzcp3c65TIoDd3lTpw+z9wQt8 y7I+n4R8cQbih7/ugz30ZhgMwuGU5OPD3pMNNZvr6Uc/HJQqj4mOD4W/7V3L5zVmxtUl IzEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=oSTgF171; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020a1709064fcd00b006e7cd47a2d3si473718ejw.189.2022.05.10.13.53.58; Tue, 10 May 2022 13:54:22 -0700 (PDT) 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=@chromium.org header.s=google header.b=oSTgF171; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348912AbiEJS22 (ORCPT + 99 others); Tue, 10 May 2022 14:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348882AbiEJS2V (ORCPT ); Tue, 10 May 2022 14:28:21 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6B2C33896 for ; Tue, 10 May 2022 11:28:20 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id hh4so14179300qtb.10 for ; Tue, 10 May 2022 11:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/xXStdS/6Ecb3QM+NfwKwg0qrP8dEo54D+TLTJCNtQU=; b=oSTgF171IFOwfEXynDmFNdUOlkACxoWv+6GMKX9CSWUKgxxAGgiWWEImQB8LktpivY AmRbQ3VoyHMAJoumcQJa4GQGnWzoatgBvdWKP2i9auMTZcYOQ9BIcBZzxGgjr1Rn/3OK LdyM+NOco9xY7Ydsenb8gtmkmwLPh9ySNRY94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/xXStdS/6Ecb3QM+NfwKwg0qrP8dEo54D+TLTJCNtQU=; b=Pp2xwRoHErLSIYXtK+tYBqWZ1IP10LvWCFVUS4k8pGlozptOpsxzZg0GL1t+Pmjqsg fm97Y2/78hO1vf6dZaz/yvSx0sGjjkhxcL9d7B8QL3AERV2llr7hcEPfTHDAehAlAjqv YYfp3Zkc5HobLGmGVH+6qR3jcUkvunOpD+T5kT1h75DsY0HjHvRCxisaVGh5FRFmu4OE Z3kx3QXmEUTPuKpDXe5erQg9KfGEo4m8vhAZ1r+A8vcI257n9al2Pf6WFH6kDAHALgCU 8lsktXQ56caH6BZjIg6+MiDI4Ccz0CvN9uiHtJpHr5mXgSL3cVMtkDN0Y5zFAHwCUlwq zKuA== X-Gm-Message-State: AOAM530Q5howPtkSwH/c0pJqpL5z5vcO+jvz9VohEahN3fGjveUsJ7ck y7BxyhNywhzj+s+/8hhHz+OZPQ== X-Received: by 2002:a05:622a:50e:b0:2f3:9a86:6e3 with SMTP id l14-20020a05622a050e00b002f39a8606e3mr21035101qtx.374.1652207299802; Tue, 10 May 2022 11:28:19 -0700 (PDT) Received: from markyacoub.nyc.corp.google.com ([2620:0:1003:314:141d:f589:29f6:2a25]) by smtp.gmail.com with ESMTPSA id g25-20020a05620a109900b0069fc13ce1e3sm8815496qkk.20.2022.05.10.11.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 11:28:19 -0700 (PDT) From: Mark Yacoub Cc: seanpaul@chromium.org, markyacoub@google.com, markyacoub@chromium.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: Add a debug message when getting a prop is missing Date: Tue, 10 May 2022 14:28:03 -0400 Message-Id: <20220510182810.1223574-1-markyacoub@chromium.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Why] If a connector property is attached but drm_atomic_connector_get_property doesn't handle a case for it, modeteset will crash with a segfault without. [How] Add a debug message indicating that a connector property is not handled when user space is trying to read it. TEST=modetest Signed-off-by: Mark Yacoub --- drivers/gpu/drm/drm_atomic_uapi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index acb1ee93d206..36b0f664dd80 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -884,6 +884,12 @@ drm_atomic_connector_get_property(struct drm_connector *connector, return connector->funcs->atomic_get_property(connector, state, property, val); } else { + // LOG that the kernel is missing handling this property as a case here. + drm_dbg_atomic( + dev, + "[CONNECTOR:%d:%s] Get Property [PROP:%d:%s] is not handled\n", + connector->base.id, connector->name, property->base.id, + property->name); return -EINVAL; } -- 2.36.0.512.ge40c2bad7a-goog