From: Maxime Ripard <maxime.ripard@bootlin.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Sean Paul <seanpaul@chromium.org>, Maxime Ripard <maxime.ripard@bootlin.com>, Daniel Vetter <daniel.vetter@intel.com>, David Airlie <airlied@linux.ie> Cc: eben@raspberrypi.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski <paul.kocialkowski@bootlin.com>, Eric Anholt <eric@anholt.net>, noralf@tronnes.org, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 6/6] drm/vc4: hdmi: Set default state margin at reset Date: Thu, 18 Apr 2019 14:41:59 +0200 [thread overview] Message-ID: <acfa6ef9cb155622dc72d5f7a7dbeae57022bdca.1555591281.git-series.maxime.ripard@bootlin.com> (raw) In-Reply-To: <cover.87b91639451f23d4ab68a7c9812f2dd158869025.1555591281.git-series.maxime.ripard@bootlin.com> Now that the TV margins are properly parsed and filled into drm_cmdline_mode, we just need to initialise the first state at reset to get those values and start using them. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> --- drivers/gpu/drm/vc4/vc4_hdmi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 99fc8569e0f5..d86f154138f5 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -255,11 +255,25 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) return ret; } +static void vc4_hdmi_connector_reset(struct drm_connector *connector) +{ + struct drm_cmdline_mode *cmdline = &connector->cmdline_mode; + struct drm_connector_state *state; + + drm_atomic_helper_connector_reset(connector); + + state = connector->state; + state->tv.margins.left = cmdline->tv_margins.left; + state->tv.margins.right = cmdline->tv_margins.right; + state->tv.margins.top = cmdline->tv_margins.top; + state->tv.margins.bottom = cmdline->tv_margins.bottom; +} + static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { .detect = vc4_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_hdmi_connector_destroy, - .reset = drm_atomic_helper_connector_reset, + .reset = vc4_hdmi_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; -- git-series 0.9.1 _______________________________________________ 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: Maxime Ripard <maxime.ripard@bootlin.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Sean Paul <seanpaul@chromium.org>, Maxime Ripard <maxime.ripard@bootlin.com>, Daniel Vetter <daniel.vetter@intel.com>, David Airlie <airlied@linux.ie> Cc: eben@raspberrypi.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski <paul.kocialkowski@bootlin.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 6/6] drm/vc4: hdmi: Set default state margin at reset Date: Thu, 18 Apr 2019 14:41:59 +0200 [thread overview] Message-ID: <acfa6ef9cb155622dc72d5f7a7dbeae57022bdca.1555591281.git-series.maxime.ripard@bootlin.com> (raw) In-Reply-To: <cover.87b91639451f23d4ab68a7c9812f2dd158869025.1555591281.git-series.maxime.ripard@bootlin.com> Now that the TV margins are properly parsed and filled into drm_cmdline_mode, we just need to initialise the first state at reset to get those values and start using them. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> --- drivers/gpu/drm/vc4/vc4_hdmi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 99fc8569e0f5..d86f154138f5 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -255,11 +255,25 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) return ret; } +static void vc4_hdmi_connector_reset(struct drm_connector *connector) +{ + struct drm_cmdline_mode *cmdline = &connector->cmdline_mode; + struct drm_connector_state *state; + + drm_atomic_helper_connector_reset(connector); + + state = connector->state; + state->tv.margins.left = cmdline->tv_margins.left; + state->tv.margins.right = cmdline->tv_margins.right; + state->tv.margins.top = cmdline->tv_margins.top; + state->tv.margins.bottom = cmdline->tv_margins.bottom; +} + static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { .detect = vc4_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = vc4_hdmi_connector_destroy, - .reset = drm_atomic_helper_connector_reset, + .reset = vc4_hdmi_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; -- git-series 0.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-04-18 12:43 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 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 ` Maxime Ripard [this message] 2019-04-18 12:41 ` [PATCH v3 6/6] drm/vc4: hdmi: Set default state margin at reset 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=acfa6ef9cb155622dc72d5f7a7dbeae57022bdca.1555591281.git-series.maxime.ripard@bootlin.com \ --to=maxime.ripard@bootlin.com \ --cc=airlied@linux.ie \ --cc=daniel.vetter@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=eben@raspberrypi.org \ --cc=eric@anholt.net \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=noralf@tronnes.org \ --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: linkBe 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.