Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3775165iob; Tue, 17 May 2022 07:04:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxa7K+yaVDbO7fdPHKb+Dj7N0I1uYWRm4F/N2j0/Qk/DIEHu6y6juEfHZOkD0og3FvFRYX X-Received: by 2002:a05:6402:3590:b0:427:ba05:6f19 with SMTP id y16-20020a056402359000b00427ba056f19mr18929650edc.334.1652796251974; Tue, 17 May 2022 07:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652796251; cv=none; d=google.com; s=arc-20160816; b=hJQRdXDpgXbOxFnmh9lFxqmZgwthXHsAbiYQ9sod/CqsVRgdbjpijQcbaIUZ6mJDZ5 h1nFNhTAZFfFDTUfNpDLNWb5zHPnDQz/l/YqeDx+w2Fx2SYZ6sutlhWXEJVCIZqGnzRe G6oD6dwCrPERXEjmGVWLciZmbxSR8fXnS75wy9a9Hyk0J1C/mcPV1Hogl+vMx4B6/vPl jUU5YUJOXaNJn+BmqBmjzPHeFjFfFjEDl2w/WNiSJChKy+EmjSUdeU97cskjqD1cAa0f zEBIPb5WvOxJiT04N84HyBL4H9rk94hoUSA2hpOTmdCYSViuNc5SBpt7MerGKpQJVSBg mr2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=I+Ue5cu5iF5f7JeyZ8sb4vC1L+AjOIfHaDHRHg+YhE8=; b=cyKQZ8BGHDcI5m/d3b0l+yHMOfo26JqGYbxgHzbGul9RZJWHzhE3ernNXfsP8gefam HcJEyheF98I+7gwfLuMiHx+Klr4P+pWUN0xgfblLK+4GDPhXxKrCsKAwU5WawBHRianp SFsedUvQ4n1yXn3AYLR2jnnpXinhw+pOHsGTi7KtY25QfhGP8vBE4QEOiVArvjo9djqb 2+nzoX1NvjCna1PYTUMMSCUal5ap0OOfVre/LneiY42ybkF1UmLD60mDwHH3xIF/06O4 1R9BQESgvGKOxR1yz6SjhrFYOXwQJUF8gkwTLIrezkg3D4Wy/V4cBlvnoF+v0UDLAZpg 7yGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="oBQvk/8x"; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp22-20020a1709073e1600b006f3a89ebad4si2998458ejc.18.2022.05.17.07.03.42; Tue, 17 May 2022 07:04:11 -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=@intel.com header.s=Intel header.b="oBQvk/8x"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241486AbiEQHv1 (ORCPT + 99 others); Tue, 17 May 2022 03:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242175AbiEQHvW (ORCPT ); Tue, 17 May 2022 03:51:22 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E22618382 for ; Tue, 17 May 2022 00:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652773881; x=1684309881; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=LWIEB4/lPMy65N4AJNM7XhWmKfMhu8OaBtUPWfYPFRM=; b=oBQvk/8x+ysG+UXf+EL7cwQUiVXMrkP+DXGzRx6WpNvsb63Irvb8PcE6 zgpf0HFN3P2ppYmVflZAA+1eLxMFpdMSVVx3qP+tIQ7UMr5pejI1Xow4Q vy8HB0kuKzGRAuHMisl5PR5mtRCBjYxslIT6q9XYyoFN29tzM7m/jkfis TDWo1WuKmRKPEXt0PNtjlsu8M9n7TQvz+06ZcV4O+Qj/BpWrpdVjtxknL kucm0DWy4qQOiBXmDJAHf6htGFSX+UqycSPhOMjuifmib4Jpx58kxQDYO +eO6UWBns30tzhXrGYgNefDZ44bYunFkDqhYStHztIRylSayxJQmM6tSZ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="271045377" X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="271045377" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 00:51:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="568758921" Received: from psagan-mobl.ger.corp.intel.com (HELO localhost) ([10.249.132.13]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 00:51:16 -0700 From: Jani Nikula To: Mark Yacoub Cc: David Airlie , markyacoub@chromium.org, linux-kernel@vger.kernel.org, seanpaul@chromium.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , markyacoub@google.com Subject: Re: [PATCH] drm: Add a debug message when getting a prop is missing In-Reply-To: <20220510182810.1223574-1-markyacoub@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220510182810.1223574-1-markyacoub@chromium.org> Date: Tue, 17 May 2022 10:51:14 +0300 Message-ID: <87bkvwfvgt.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 May 2022, 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. The comment is unnecessary, and we also don't use // comments. > + 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); Why not use the same message as in drm_atomic_connector_set_property()? Blank line here. BR, Jani. > return -EINVAL; > } -- Jani Nikula, Intel Open Source Graphics Center