Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3122083iob; Mon, 16 May 2022 13:39:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaZlBGXnFr9dkYwPzYuUveBrtcZJploezwCiksI5UYsU7JRsVara9EGKVU2VeXmzRZ+YP7 X-Received: by 2002:a17:906:9749:b0:6f5:38d:d4d8 with SMTP id o9-20020a170906974900b006f5038dd4d8mr16672562ejy.405.1652733581201; Mon, 16 May 2022 13:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652733581; cv=none; d=google.com; s=arc-20160816; b=U9jKwJDVz/GJhKDr1U/3xeXMKn7Gza99FFtpggOmIS2tofnP4Hkgfds9QE+SNyWeBI UwNmvGQN+QShllqlOpAzhKQD+myLwAF76WfOAqhiZq3sVSVU57qUyBACuEy0T/B8h+ly 3/VTjILBiaZeHr9BhV2z26lAUpuGuo8NZz2hzIg7AkeLDxLUzJXSH6XQF6rjXk6LVmox 4YWhXLxm+UpNPIrIQH22Ou96LrQab5d8vzhi2gNPCx56tC1wDZeL+BqiwWJAwTNo3WuH tMqjaxLJu76fQz/zl6xlCDxSlr2qHaVeHF1ibT3u8EsR6puIZeSpq/srN2nSQyHdBEoI rhrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:cc:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ThtkhJjqmQfv2SviiAcmC8uKNvCTv+1Qfs3YExwXtrM=; b=ck5Lj9ZD8jl/H68cidaB+FJy1+XgmmXw0L/BfTdBgCalrAuLKFFX9EsNGBvlLugR4+ vmehFF8HhnhKhUfg8OFdb5MWDHxM+svBCHUHxhTtFgPocKxdxjlkEXbZGoBDh2fNo+kq iXInNJ5kr7aiEJIZQo9idplFEzpElwPY4H10i4Bt2WMHmM7E2pZuDwy4QQpFKhYN9gR+ b5bC+2sKncU3NWMG7ljBWTSkJXTelelzW/bBWH0hWbdQjR3GD2wGNb7kMFwRuNNDByM2 Te6ULImAyzyFlw4ZaybEa9fwwGQJE0j9bDsYCCoiPpksff2Tch2cASUtyrf3XQzbwaQ3 eytA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AjpSNO+R; 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=pass (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 jj17-20020a170907985100b006f3a56dbf9esi284951ejc.839.2022.05.16.13.39.15; Mon, 16 May 2022 13:39:41 -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=pass header.i=@chromium.org header.s=google header.b=AjpSNO+R; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245027AbiEPPLx (ORCPT + 99 others); Mon, 16 May 2022 11:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245056AbiEPPLM (ORCPT ); Mon, 16 May 2022 11:11:12 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C026DA8 for ; Mon, 16 May 2022 08:11:10 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id t25so26360504lfg.7 for ; Mon, 16 May 2022 08:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=ThtkhJjqmQfv2SviiAcmC8uKNvCTv+1Qfs3YExwXtrM=; b=AjpSNO+RwZkxk9UOYfbwCpYPaJePlh7oHjbLSRFeUi0zmB2xOIMXi5ZBJr625RCOqW RrV6ZMvjzumxfNzEYF65DfpGotjDd8oumRdmgUF4U0J6XGJDF7nl3AeCsxY67vKsk1v1 Msru0Wty4qi5jhQCtr68vZDSjdPBoa0gPTL/k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=ThtkhJjqmQfv2SviiAcmC8uKNvCTv+1Qfs3YExwXtrM=; b=kqhgv/1pJhoN6K5ngBaReHiNTjkkOO+NkVPaXqGVSDcCIE+DMUiSFvzPC/L9UoZzqL rsQjjqMO/i/x98SQmdE6842LRm3vlWmT77FHfSjhnsRZW6+DtVtLtamidQnDayJ8XUCy 1GL29pMWZ/BUDOjWlELxITAXHSsm8+W8rV3JMVI7DW6ZjCUYIvQxAEyulfOMopue1KeW w/ryJWxbOc+R/oVyRw7rLZAEi3hJeN7m9qDSVwRfnU77G9mjHRP/EeLo0J/8YjrHktn4 MH/mqmBNpLWy+BB0adAghyed81nY7BWRmmJb24GIFMYQVyxCF069k3kzbMbJb/Mh7gwX XQoA== X-Gm-Message-State: AOAM533JO7ar4iSxxm266JL2rFXVgR6993OgFK8PR1b/HZcYSUEtYdVZ GhyASPtWr/uEPjwnfa9nY3DRExQTRVuFp/W3Kf9eOQ== X-Received: by 2002:ac2:4475:0:b0:473:f03c:a041 with SMTP id y21-20020ac24475000000b00473f03ca041mt3948439lfl.192.1652713868087; Mon, 16 May 2022 08:11:08 -0700 (PDT) MIME-Version: 1.0 References: <20220510182810.1223574-1-markyacoub@chromium.org> In-Reply-To: <20220510182810.1223574-1-markyacoub@chromium.org> From: Mark Yacoub Date: Mon, 16 May 2022 11:10:57 -0400 Message-ID: Subject: Re: [PATCH] drm: Add a debug message when getting a prop is missing Cc: seanpaul@chromium.org, markyacoub@google.com, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 friendly ping :)) On Tue, May 10, 2022 at 2:28 PM Mark Yacoub wrote: > > [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 >