All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	dri-devel@lists.freedesktop.org, eben@raspberrypi.org
Subject: Re: [PATCH v3 4/6] drm/modes: Parse overscan properties
Date: Fri, 19 Apr 2019 11:05:31 +0200	[thread overview]
Message-ID: <ad38610a-001f-2bff-a967-8f88596bb830@tronnes.org> (raw)
In-Reply-To: <587e382a-cd0a-3555-521f-b842e8cb154a@tronnes.org>



Den 18.04.2019 18.50, skrev Noralf Trønnes:
> 
> 
> Den 18.04.2019 14.41, skrev Maxime Ripard:
>> Properly configuring the overscan properties might be needed for the
>> initial setup of the framebuffer for display that still have overscan.
>> Let's allow for more properties on the kernel command line to setup each
>> margin.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
>> ---
>>  drivers/gpu/drm/drm_modes.c | 44 ++++++++++++++++++++++++++++++++++++++-
>>  include/drm/drm_connector.h | 14 ++++++++++++-
>>  2 files changed, 58 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
>> index ac8d70b92b62..d93c44a97ce9 100644
>> --- a/drivers/gpu/drm/drm_modes.c
>> +++ b/drivers/gpu/drm/drm_modes.c
>> @@ -1586,6 +1586,50 @@ static int drm_mode_parse_cmdline_options(char *str, size_t len,
>>  		} else if (!strncmp(option, "reflect_y", delim - option)) {
>>  			rotation |= DRM_MODE_REFLECT_Y;
>>  			sep = delim;
>> +		} else if (!strncmp(option, "margin_right", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.right = margin;
>> +		} else if (!strncmp(option, "margin_left", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.left = margin;
>> +		} else if (!strncmp(option, "margin_top", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.top = margin;
>> +		} else if (!strncmp(option, "margin_bottom", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.bottom = margin;
>>  		} else {
>>  			return -EINVAL;
>>  		}
>> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
>> index 6f57c1a3afff..89bc6ac38043 100644
>> --- a/include/drm/drm_connector.h
>> +++ b/include/drm/drm_connector.h
>> @@ -917,6 +917,20 @@ struct drm_cmdline_mode {
>>  	 * DRM_MODE_ROTATE_180 are supported at the moment.
>>  	 */
>>  	unsigned int rotation;
>> +
>> +	/**
>> +	 * @tv_margins: TV margins (in pixels)
>> +	 * @tv_margins.left: left margin
>> +	 * @tv_margins.right: right margin
>> +	 * @tv_margins.top: top margin
>> +	 * @tv_margins.bottom: bottom margin
>> +	 */
> 
> I haven't seen kernel docs like this before so I assume you have tested
> with make htmldocs.
> 
> This one also needs mention in Documentation/fb/modedb.txt. With that:
> 

I discovered that the drm_mode_parse_command_line_for_connector() kernel
doc has the parameters mentioned, so it also needs to be updated.

> Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
> 
>> +	struct {
>> +		unsigned int left;
>> +		unsigned int right;
>> +		unsigned int top;
>> +		unsigned int bottom;
>> +	} tv_margins;
>>  };
>>  
>>  /**
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	dri-devel@lists.freedesktop.org, eben@raspberrypi.org
Subject: Re: [PATCH v3 4/6] drm/modes: Parse overscan properties
Date: Fri, 19 Apr 2019 11:05:31 +0200	[thread overview]
Message-ID: <ad38610a-001f-2bff-a967-8f88596bb830@tronnes.org> (raw)
In-Reply-To: <587e382a-cd0a-3555-521f-b842e8cb154a@tronnes.org>



Den 18.04.2019 18.50, skrev Noralf Trønnes:
> 
> 
> Den 18.04.2019 14.41, skrev Maxime Ripard:
>> Properly configuring the overscan properties might be needed for the
>> initial setup of the framebuffer for display that still have overscan.
>> Let's allow for more properties on the kernel command line to setup each
>> margin.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
>> ---
>>  drivers/gpu/drm/drm_modes.c | 44 ++++++++++++++++++++++++++++++++++++++-
>>  include/drm/drm_connector.h | 14 ++++++++++++-
>>  2 files changed, 58 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
>> index ac8d70b92b62..d93c44a97ce9 100644
>> --- a/drivers/gpu/drm/drm_modes.c
>> +++ b/drivers/gpu/drm/drm_modes.c
>> @@ -1586,6 +1586,50 @@ static int drm_mode_parse_cmdline_options(char *str, size_t len,
>>  		} else if (!strncmp(option, "reflect_y", delim - option)) {
>>  			rotation |= DRM_MODE_REFLECT_Y;
>>  			sep = delim;
>> +		} else if (!strncmp(option, "margin_right", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.right = margin;
>> +		} else if (!strncmp(option, "margin_left", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.left = margin;
>> +		} else if (!strncmp(option, "margin_top", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.top = margin;
>> +		} else if (!strncmp(option, "margin_bottom", delim - option)) {
>> +			const char *value = delim + 1;
>> +			unsigned int margin;
>> +
>> +			margin = simple_strtol(value, &sep, 10);
>> +
>> +			/* Make sure we have parsed something */
>> +			if (sep == value)
>> +				return -EINVAL;
>> +
>> +			mode->tv_margins.bottom = margin;
>>  		} else {
>>  			return -EINVAL;
>>  		}
>> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
>> index 6f57c1a3afff..89bc6ac38043 100644
>> --- a/include/drm/drm_connector.h
>> +++ b/include/drm/drm_connector.h
>> @@ -917,6 +917,20 @@ struct drm_cmdline_mode {
>>  	 * DRM_MODE_ROTATE_180 are supported at the moment.
>>  	 */
>>  	unsigned int rotation;
>> +
>> +	/**
>> +	 * @tv_margins: TV margins (in pixels)
>> +	 * @tv_margins.left: left margin
>> +	 * @tv_margins.right: right margin
>> +	 * @tv_margins.top: top margin
>> +	 * @tv_margins.bottom: bottom margin
>> +	 */
> 
> I haven't seen kernel docs like this before so I assume you have tested
> with make htmldocs.
> 
> This one also needs mention in Documentation/fb/modedb.txt. With that:
> 

I discovered that the drm_mode_parse_command_line_for_connector() kernel
doc has the parameters mentioned, so it also needs to be updated.

> Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
> 
>> +	struct {
>> +		unsigned int left;
>> +		unsigned int right;
>> +		unsigned int top;
>> +		unsigned int bottom;
>> +	} tv_margins;
>>  };
>>  
>>  /**
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-04-19  9:05 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 12:41 [PATCH v3 0/6] drm/vc4: Allow for more boot-time configuration Maxime Ripard
2019-04-18 12:41 ` Maxime Ripard
2019-04-18 12:41 ` [PATCH v3 1/6] drm/modes: Rewrite the command line parser Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:11   ` Noralf Trønnes
2019-04-18 16:11     ` Noralf Trønnes
2019-04-18 12:41 ` [PATCH v3 2/6] drm/modes: Support modes names on the command line Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:22   ` Noralf Trønnes
2019-04-18 16:22     ` Noralf Trønnes
2019-04-18 12:41 ` [PATCH v3 3/6] drm/modes: Allow to specify rotation and reflection on the commandline Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:40   ` Noralf Trønnes
2019-04-18 16:40     ` Noralf Trønnes
2019-04-19  8:53     ` Noralf Trønnes
2019-04-19  8:53       ` Noralf Trønnes
2019-06-11 13:20       ` Maxime Ripard
2019-06-11 13:20         ` Maxime Ripard
2019-06-12  8:11         ` Jani Nikula
2019-06-12  8:11           ` Jani Nikula
2019-06-12 13:21         ` Noralf Trønnes
2019-06-12 13:21           ` Noralf Trønnes
2019-06-13 12:50           ` Maxime Ripard
2019-06-13 12:50             ` Maxime Ripard
2019-06-13 14:12             ` Noralf Trønnes
2019-06-13 14:12               ` Noralf Trønnes
2019-06-11 12:49     ` Maxime Ripard
2019-06-11 12:49       ` Maxime Ripard
2019-06-12 12:43       ` Noralf Trønnes
2019-06-12 12:43         ` Noralf Trønnes
2019-06-12 15:54         ` Maxime Ripard
2019-06-12 15:54           ` Maxime Ripard
2019-04-18 12:41 ` [PATCH v3 4/6] drm/modes: Parse overscan properties Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:50   ` Noralf Trønnes
2019-04-18 16:50     ` Noralf Trønnes
2019-04-19  9:05     ` Noralf Trønnes [this message]
2019-04-19  9:05       ` Noralf Trønnes
2019-04-18 12:41 ` [PATCH v3 5/6] drm/selftests: Add command line parser selftests Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:51   ` Noralf Trønnes
2019-04-18 16:51     ` Noralf Trønnes
2019-04-18 12:41 ` [PATCH v3 6/6] drm/vc4: hdmi: Set default state margin at reset Maxime Ripard
2019-04-18 12:41   ` Maxime Ripard
2019-04-18 16:59   ` Noralf Trønnes
2019-04-19 18:50     ` Noralf Trønnes
2019-04-19 18:50       ` Noralf Trønnes

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=ad38610a-001f-2bff-a967-8f88596bb830@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eben@raspberrypi.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=seanpaul@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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.