From: Inki Dae <inki.dae@samsung.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
dri-devel@lists.freedesktop.org,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v2 02/10] drm/exynos: use helper to set possible crtcs
Date: Fri, 25 Aug 2017 11:42:21 +0900 [thread overview]
Message-ID: <599F8E8D.6040000@samsung.com> (raw)
In-Reply-To: <1503581639-580-3-git-send-email-a.hajda@samsung.com>
2017년 08월 24일 22:33에 Andrzej Hajda 이(가) 쓴 글:
> All encoders share the same code to set encoders possible_crtcs field.
> The patch creates helper to abstract out this code.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_dp.c | 15 +++++----------
> drivers/gpu/drm/exynos/exynos_drm_core.c | 1 +
> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 21 ++++++++++++++++++---
> drivers/gpu/drm/exynos/exynos_drm_crtc.h | 10 +++++++---
> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 12 ++++--------
> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++++---------
> drivers/gpu/drm/exynos/exynos_drm_vidi.c | 15 +++++----------
> drivers/gpu/drm/exynos/exynos_hdmi.c | 25 +++++++++----------------
> 8 files changed, 53 insertions(+), 59 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c
> index 385537b..39629e7 100644
> --- a/drivers/gpu/drm/exynos/exynos_dp.c
> +++ b/drivers/gpu/drm/exynos/exynos_dp.c
> @@ -155,7 +155,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
> struct exynos_dp_device *dp = dev_get_drvdata(dev);
> struct drm_encoder *encoder = &dp->encoder;
> struct drm_device *drm_dev = data;
> - int pipe, ret;
> + int ret;
>
> /*
> * Just like the probe function said, we don't need the
> @@ -179,20 +179,15 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
> return ret;
> }
>
> - pipe = exynos_drm_crtc_get_pipe_from_type(drm_dev,
> - EXYNOS_DISPLAY_TYPE_LCD);
> - if (pipe < 0)
> - return pipe;
> -
> - encoder->possible_crtcs = 1 << pipe;
> -
> - DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
> -
> drm_encoder_init(drm_dev, encoder, &exynos_dp_encoder_funcs,
> DRM_MODE_ENCODER_TMDS, NULL);
>
> drm_encoder_helper_add(encoder, &exynos_dp_encoder_helper_funcs);
>
> + ret = exynos_drm_set_possible_crtcs(encoder, EXYNOS_DISPLAY_TYPE_LCD);
> + if (ret < 0)
> + return ret;
> +
> dp->plat_data.encoder = encoder;
>
> return analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c
> index edbd98f..b0c0621 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_core.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c
> @@ -13,6 +13,7 @@
> */
>
> #include <drm/drmP.h>
> +
> #include "exynos_drm_drv.h"
> #include "exynos_drm_crtc.h"
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index c37078f..ac544de 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -16,6 +16,7 @@
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_encoder.h>
>
> #include "exynos_drm_crtc.h"
> #include "exynos_drm_drv.h"
> @@ -191,16 +192,30 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
> return ERR_PTR(ret);
> }
>
> -int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
> +struct exynos_drm_crtc *exynos_drm_crtc_get_by_type(struct drm_device *drm_dev,
You don't have to modify this function because no user to use this function here.
Moving this change to actual user, patch 4, would be better. Anyway trivial thing so I will merge it as-is.
Thanks,
Inki Dae
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-08-25 2:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170824133408eucas1p2466a3b4aac528667cd06df9c00aca1df@eucas1p2.samsung.com>
2017-08-24 13:33 ` [PATCH v2 00/10] drm/exynos: panel mode info propagation Andrzej Hajda
[not found] ` <CGME20170824133408eucas1p1e7b9988ac74fdd3e8dd8d25ead949ec5@eucas1p1.samsung.com>
[not found] ` <1503581639-580-1-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-08-24 13:33 ` [PATCH v2 01/10] drm/exynos/decon5433: use readl_poll_timeout helpers Andrzej Hajda
2017-08-24 13:54 ` Tobias Jakobi
2017-08-24 16:18 ` Andrzej Hajda
2017-08-25 11:25 ` Tobias Jakobi
2017-08-24 13:33 ` [PATCH v2 03/10] drm/exynos/dsi: refactor panel detection logic Andrzej Hajda
2017-08-25 1:46 ` Inki Dae
2017-08-24 13:33 ` [PATCH v2 07/10] drm/exynos: add mode_valid callback to exynos_drm Andrzej Hajda
2017-08-24 13:33 ` [PATCH v2 09/10] dt-bindings: exynos5433-decon: remove i80-if-timings property Andrzej Hajda
2017-08-31 18:40 ` Rob Herring
2017-08-24 13:33 ` [PATCH v2 02/10] drm/exynos: use helper to set possible crtcs Andrzej Hajda
2017-08-25 2:42 ` Inki Dae [this message]
2017-08-24 13:33 ` [PATCH v2 04/10] drm/exynos/dsi: propagate info about command mode from panel Andrzej Hajda
2017-08-24 13:33 ` [PATCH v2 05/10] drm/exynos/mic: use mode info stored in CRTC to detect i80 mode Andrzej Hajda
2017-08-25 2:55 ` Inki Dae
2017-08-24 13:33 ` [PATCH v2 06/10] drm/exynos/decon5433: refactor irq requesting code Andrzej Hajda
2017-08-24 13:33 ` [PATCH v2 08/10] drm/exynos/decon5433: use mode info stored in CRTC to detect i80 mode Andrzej Hajda
2017-08-25 2:15 ` Inki Dae
2017-08-24 13:33 ` [PATCH v2 10/10] arm64: dts: exynos: remove i80-if-timings nodes Andrzej Hajda
2017-09-08 16:47 ` Krzysztof Kozlowski
2017-11-28 11:56 ` Krzysztof Kozlowski
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=599F8E8D.6040000@samsung.com \
--to=inki.dae@samsung.com \
--cc=a.hajda@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk@kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox