Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6499834rdb; Tue, 2 Jan 2024 04:17:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHdAtl5rJDikPrXyhhrP8rj/kKb9VeS0Udy0/st27kEQyktXc66EnzIrqkQTgLbNG7995d X-Received: by 2002:a17:902:cec9:b0:1d4:5268:27f6 with SMTP id d9-20020a170902cec900b001d4526827f6mr6658139plg.79.1704197825555; Tue, 02 Jan 2024 04:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704197825; cv=none; d=google.com; s=arc-20160816; b=edn/fC40uVsIEUvlQzb+8PQ9j4DhwcZFJ4/oLQSLTF5LPjeVSwDrYfyrnpedHWLk+/ So2C64xuU/yzlRwyZQezxI9LgObCF/LUyYCHPwuB9XKsCuP3/csLcYlwttnJgq7RB8Pa yoo74HIkzZ6PfF48JnTOBCSTFmZj/mLqzbAy73+6AE9Z3GOCS3FXCIXD6y705GhkaoGw 9bEeR59A1wIiEOhjwvqM6ZHblseonPcJsJhL4bI6B4gmoX/YYKmr5CmHztezm8zDVQA4 HP7kyKKOdyISMs6AMDQtEge6kHYtjOoTmm2Cv/LdsJJwybSe6eD4lkvYqws3CzT5ZujQ 5gyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=DPlLEBXfhLSd7sMzVTM760zSh1zEAP22oRkr84xyyqI=; fh=GPbHQuYshrAa4DZxd4d8O9BLualsHWfljoTHd9iRQ3w=; b=rGnrzq7Urh8rTOw4OXKN+Le3gVJkw1stJHQ6JIPxojn/Z3bHyIRWJ9WqhSh9DlDd5v KHrHexB1Nw45lYAhgP95qxJdwFWGOoTLym1fo6J5amMDv1N24/Q+rOSl99s7pUs2R8uW 9d4LPeusuQYtpNtnRNpzertNCj93jX7APnp4V0M8+Pi3NMC4lgszjDiNqRHHDyTTJyQb khVXWrweNGZEIHKl+Afn7NBUji06U2Eg/bBOejCv5idTCBdidHZg+DlQIKCm3vc6TYw/ xM5Q2HGiB1bd2q51PoNZsqPH1D0vSPHEyEaxjS8YrW0SKkIVv3qyNmL1uutoN3cG5G6z 8xcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XZb8FQ3H; spf=pass (google.com: domain of linux-kernel+bounces-14332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q12-20020a170902dacc00b001d4c9800e08si685542plx.405.2024.01.02.04.17.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 04:17:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XZb8FQ3H; spf=pass (google.com: domain of linux-kernel+bounces-14332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 622A1B20EE4 for ; Tue, 2 Jan 2024 12:17:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CCC8F4E2; Tue, 2 Jan 2024 12:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XZb8FQ3H" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47479EEC6 for ; Tue, 2 Jan 2024 12:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704197811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DPlLEBXfhLSd7sMzVTM760zSh1zEAP22oRkr84xyyqI=; b=XZb8FQ3HHrMvOJEtsLIxQvGSirAGsr9l5SfZnqH84+3XK2wiysFk8aa5sBJ7pTbK1/PgYe fcYlxaMbXaB+KCD590CBwD7ol/3RYWugBumKEktNgcl/8bFE9l+5/jNwEoWUsNtBFiqVYi 4uCCSPokhZkgInHzPjfXFuoeqd+K3ZQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-fHBa-TNVOY-M2IThzyzP9g-1; Tue, 02 Jan 2024 07:16:44 -0500 X-MC-Unique: fHBa-TNVOY-M2IThzyzP9g-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40d890b4536so11598085e9.2 for ; Tue, 02 Jan 2024 04:16:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704197803; x=1704802603; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DPlLEBXfhLSd7sMzVTM760zSh1zEAP22oRkr84xyyqI=; b=Z1Wl9kaYpJ7iCNt90j22UajI3eXu0eXWraFm0cdIgoSb/dFq6KiyK3n2lYd72SvE7T rVzz6FxZATSEYAPgfdlfDAMSH1XKr2B4GgBamVoUjzFMAI0BOUMcUOYIo+hYHyNtef86 yrcZ80EvHmnVx/LmjYxOT7Z2fdCYAGBgfP27CSymgIQk22WhTvGC+PqFTXAsVk42P3BY 1Hi+ZROScXo+BasPynWYjIF0xxAFmEbjfBHpPA/ycYtaP3Gl1RIAHmM50LIt9/4vancs 6M5GUA2W1I+ROvOENHNMYeo8hbc3c4Xdp8DLnvx/1vd0IZRkds6h49h/tTZS75ZKgbqU oYeQ== X-Gm-Message-State: AOJu0Yx5T4Nw/75S2wekm06CLUKTtfUiEVCMheqhBuuwwoL1uU3kQO3t q6MXDrOG0dU8o9ZUvGJ3FpUp0hzP5qKQKyrrczIOMasC8lGFcGd5BviX4gBmmeQJ3whm7kbxLBT iN7O8HZJ12vdbwyCjZD890kGkceDcwpF+3uguQKzKIcc= X-Received: by 2002:a05:600c:c0b:b0:40d:8cd1:736a with SMTP id fm11-20020a05600c0c0b00b0040d8cd1736amr380538wmb.50.1704197803225; Tue, 02 Jan 2024 04:16:43 -0800 (PST) X-Received: by 2002:a05:600c:c0b:b0:40d:8cd1:736a with SMTP id fm11-20020a05600c0c0b00b0040d8cd1736amr380535wmb.50.1704197802896; Tue, 02 Jan 2024 04:16:42 -0800 (PST) Received: from localhost (red-hat-inc.vlan560.asr1.mad1.gblx.net. [159.63.51.90]) by smtp.gmail.com with ESMTPSA id fa8-20020a05600c518800b0040d87c5dfe1sm8469244wmb.8.2024.01.02.04.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 04:16:42 -0800 (PST) From: Javier Martinez Canillas To: Jani Nikula , linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, David Airlie Subject: Re: [PATCH] drm: Move drm_set_preferred_mode() helper from drm_edid to drm_modes In-Reply-To: <87y1d80x3l.fsf@intel.com> References: <20240102111921.3057255-1-javierm@redhat.com> <87y1d80x3l.fsf@intel.com> Date: Tue, 02 Jan 2024 13:16:42 +0100 Message-ID: <87o7e43p79.fsf@minerva.mail-host-address-is-not-set> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jani Nikula writes: Hello Jani, > On Tue, 02 Jan 2024, Javier Martinez Canillas wrote: >> The helper is generic and doesn't use the opaque EDID type struct drm_edid >> and is also used by drivers that only support non-probeable displays, such >> as fixed panels. >> >> These drivers add a list of modes using drm_mode_probed_add() and then set >> a preferred mode using the drm_set_preferred_mode() helper. >> >> It seems more logical to have the helper definition in drm_modes.o instead >> of drm_edid.o, since the former contains modes helper while the latter has >> helpers to manage the EDID information. >> >> Since both drm_edid.o and drm_modes.o object files are built-in the drm.o >> object, there are no functional changes. But besides being a more logical >> place for this helper, it could also allow to eventually make drm_edid.o >> optional and not included in drm.o if only fixed panels must be supported >> in a given system. >> >> Signed-off-by: Javier Martinez Canillas >> --- >> >> drivers/gpu/drm/drm_edid.c | 23 +---------------------- >> drivers/gpu/drm/drm_modes.c | 22 ++++++++++++++++++++++ >> include/drm/drm_edid.h | 2 -- >> include/drm/drm_modes.h | 2 ++ >> 4 files changed, 25 insertions(+), 24 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index cb4031d5dcbb..48dd2a0a0395 100644 >> --- a/drivers/gpu/drm/drm_edid.c >> +++ b/drivers/gpu/drm/drm_edid.c >> @@ -43,6 +43,7 @@ >> #include >> #include >> #include >> +#include > > Unnecessary. > Indeed. I could swear that saw drm_set_preferred_mode() being called somewhere in drm_edid.c but looking again I see that's not the case. > Other than that, > > Reviewed-by: Jani Nikula > Thanks. I'll post a v2 that drops the unnecessary header include. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat