All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@gmail.com, simona@ffwll.ch, airlied@redhat.com,
	jfalempe@redhat.com
Cc: dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 3/7] drm: Add bmc_attached flag to connector
Date: Fri, 11 Oct 2024 12:01:04 +0300	[thread overview]
Message-ID: <871q0n6mjz.fsf@intel.com> (raw)
In-Reply-To: <20241011065705.6728-4-tzimmermann@suse.de>

On Fri, 11 Oct 2024, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Add the bmc_attached flag to struct drm_connector to signal the
> presence of a virtual BMC output. The connector reports to be in
> status connected even without a physically connected display. Fbcon
> or userspace compositors would otherwise stop displaying to the
> BMC.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 6 +++++-
>  include/drm/drm_connector.h        | 8 ++++++++
>  2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index df44be128e72..83c3f2d42d49 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -605,7 +605,11 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
>  			ret = connector_status_unknown;
>  
>  		connector->physical_status = ret;
> -		connector->status = connector->physical_status;
> +
> +		if (connector->bmc_attached)
> +			connector->status = connector_status_connected;
> +		else
> +			connector->status = connector->physical_status;

Perhaps all this would make more sense squashed into the previous patch?

>  	}
>  
>  	/*
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 37e951f04ae8..ed360ae35f21 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1802,6 +1802,14 @@ struct drm_connector {
>  	 */
>  	bool ycbcr_420_allowed;
>  
> +	/**
> +	 * @ bmc_attached:
> +	 * The connector has a BMC transparently attached to it. It has to
> +	 * report a connected status, even without a physically connected
> +	 * display.
> +	 */
> +	bool bmc_attached;

Who is supposed to set this and when? Can it be changed during connector
life cycle? (I find myself wishing for C++ public/private members,
*gasp*!)

Again, there's bound to be people for whom "BMC" means nothing, and
therefore this member means nothing. I'm wondering if the name could be
something with a higher level of abstraction. In some ways, this is
related to or a special case of connector->force, but without the
uapi. You know, "logical force", with the use case being BMC.

BR,
Jani.


> +
>  	/**
>  	 * @registration_state: Is this connector initializing, exposed
>  	 * (registered) with userspace, or unregistered?

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-10-11  9:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  6:43 [PATCH 0/7] drm: Add physical status and BMC support to conenctor Thomas Zimmermann
2024-10-11  6:43 ` [PATCH 1/7] drm/probe-helper: Call connector detect functions in single helper Thomas Zimmermann
2024-10-11  6:43 ` [PATCH 2/7] drm: Add physical status to connector Thomas Zimmermann
2024-10-11  8:51   ` Jani Nikula
2024-10-11  9:01     ` Thomas Zimmermann
2024-10-11  6:43 ` [PATCH 3/7] drm: Add bmc_attached flag " Thomas Zimmermann
2024-10-11  9:01   ` Jani Nikula [this message]
2024-10-11  6:43 ` [PATCH 4/7] drm/ast: sil164: Clear EDID if no display is connected Thomas Zimmermann
2024-10-11  6:43 ` [PATCH 5/7] drm/ast: vga: " Thomas Zimmermann
2024-10-11  6:43 ` [PATCH 6/7] drm/ast: Track physical connector status in struct drm_connector Thomas Zimmermann
2024-10-11  9:05   ` Jani Nikula
2024-10-11  6:43 ` [PATCH 7/7] drm/mgag200: " Thomas Zimmermann
2024-10-11  9:08 ` [PATCH 0/7] drm: Add physical status and BMC support to conenctor Jani Nikula
2024-10-11 10:52 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q0n6mjz.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.