From: Daniel Vetter <daniel@ffwll.ch>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Maxime Ripard" <maxime.ripard@bootlin.com>,
dri-devel@lists.freedesktop.org,
"David Airlie" <airlied@linux.ie>,
"Sean Paul" <seanpaul@chromium.org>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"Mathieu Alexandre-Tétreault" <alexandretm@amotus.ca>
Subject: Re: [PATCH 10/12] drm/modes: parse_cmdline: Remove some unnecessary code
Date: Tue, 12 Nov 2019 10:44:55 +0100 [thread overview]
Message-ID: <20191112094455.GG23790@phenom.ffwll.local> (raw)
In-Reply-To: <20191110154101.26486-11-hdegoede@redhat.com>
On Sun, Nov 10, 2019 at 04:40:59PM +0100, Hans de Goede wrote:
> Remove 2 bits of dead-code:
>
> 1) drm_mode_parse_command_line_for_connector() always gets called with a
> zero-ed drm_cmdline_mode struct and assumes so in most places, so there is
> no reason to set mode->specified to false if no mode_option is present.
>
Hm I'd keep that part, just for safety. It's not really a performance
critical path really ...
-Daniel
> 2) fb_get_options() will return fb_mode_option if no video=<connector-name>
> argument is present on the kernel commandline, so there is no need to also
> do this in drm_mode_parse_command_line_for_connector() as our only caller
> uses fb_get_options() to get the mode_option argument.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/gpu/drm/drm_modes.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 119fed7ab815..0bf3cb8c08ff 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1747,15 +1747,8 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
>
> mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
>
> -#ifdef CONFIG_FB
> if (!mode_option)
> - mode_option = fb_mode_option;
> -#endif
> -
> - if (!mode_option) {
> - mode->specified = false;
> return false;
> - }
>
> name = mode_option;
>
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-11-12 9:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-10 15:40 [PATCH 00/12] drm/modes: parse_cmdline: Add support for specifying panel_orientation on the kernel cmdline Hans de Goede
2019-11-10 15:40 ` [PATCH 01/12] drm/modes: parse_cmdline: Fix possible reference past end of string Hans de Goede
2019-11-10 15:40 ` [PATCH 02/12] drm/modes: parse_cmdline: Make various char pointers const Hans de Goede
2019-11-10 15:40 ` [PATCH 03/12] drm/modes: parse_cmdline: Stop parsing extras after bpp / refresh at ', ' Hans de Goede
2019-11-10 15:40 ` [PATCH 04/12] drm/modes: parse_cmdline: Accept extras directly after mode combined with options Hans de Goede
2019-11-10 15:40 ` [PATCH 05/12] drm/modes: parse_cmdline: Rework drm_mode_parse_cmdline_options() Hans de Goede
2019-11-10 15:40 ` [PATCH 06/12] drm/modes: parse_cmdline: Add freestanding argument to drm_mode_parse_cmdline_options() Hans de Goede
2019-11-10 15:40 ` [PATCH 07/12] drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing Hans de Goede
2019-11-10 15:40 ` [PATCH 08/12] drm/modes: parse_cmdline: Allow specifying stand-alone options Hans de Goede
2019-11-10 15:40 ` [PATCH 09/12] drm/modes: parse_cmdline: Add support for specifying panel_orientation Hans de Goede
2019-11-11 12:53 ` Maxime Ripard
2019-11-11 17:25 ` Hans de Goede
2019-11-13 16:12 ` Maxime Ripard
2019-11-13 3:50 ` kbuild test robot
2019-11-13 3:50 ` kbuild test robot
2019-11-13 3:50 ` kbuild test robot
2019-11-10 15:40 ` [PATCH 10/12] drm/modes: parse_cmdline: Remove some unnecessary code Hans de Goede
2019-11-12 9:44 ` Daniel Vetter [this message]
2019-11-12 10:39 ` Hans de Goede
2019-11-10 15:41 ` [PATCH 11/12] drm/connector: Split out orientation quirk detection (v2) Hans de Goede
2019-11-10 15:41 ` [PATCH 12/12] drm/connector: Hookup the new drm_cmdline_mode panel_orientation member Hans de Goede
2019-11-12 9:47 ` Daniel Vetter
2019-11-12 10:43 ` Hans de Goede
2019-11-12 13:32 ` Daniel Vetter
2019-11-12 13:39 ` Hans de Goede
2019-11-12 13:47 ` Daniel Vetter
2019-11-13 15:54 ` Hans de Goede
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=20191112094455.GG23790@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=alexandretm@amotus.ca \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=maxime.ripard@bootlin.com \
--cc=seanpaul@chromium.org \
/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.