All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Rahul Sharma <rahul.sharma@samsung.com>
Cc: s.shirish@samsung.com, l.krishna@samsung.com, joshi@samsung.com,
	dri-devel@lists.freedesktop.org, kyungmin.park@samsung.com,
	fahad.k@samsung.com, prashanth.g@samsung.com
Subject: Re: [PATCH 09/14] drm: exynos: hdmi: add support for platform variants for mixer
Date: Tue, 02 Oct 2012 16:26:58 +0900	[thread overview]
Message-ID: <506A9742.5050900@samsung.com> (raw)
In-Reply-To: <1348842336-2153-10-git-send-email-rahul.sharma@samsung.com>

On 09/28/2012 11:25 PM, Rahul Sharma wrote:
> This patch adds the support for multiple mixer versions avaialble in
> various platform variants. Version is passed as a driver data field
> instead of paltform data.
>
> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
> ---
>   drivers/gpu/drm/exynos/exynos_mixer.c |   28 ++++++++++++++++++++++++++++
>   1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 8a43ee1..30233a3 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -73,6 +73,12 @@ struct mixer_resources {
>   	struct clk		*sclk_dac;
>   };
>   
> +enum mixer_version_id {
> +	MXR_VER_INVALID = -1,

Does MXR_VER_INVALID enum need really?

> +	MXR_VER_0_0_0_16,
> +	MXR_VER_16_0_33_0,
> +};
> +
>   struct mixer_context {
>   	struct device		*dev;
>   	int			pipe;
> @@ -83,6 +89,11 @@ struct mixer_context {
>   	struct mutex		mixer_mutex;
>   	struct mixer_resources	mixer_res;
>   	struct hdmi_win_data	win_data[MIXER_WIN_NR];
> +	enum mixer_version_id	mxr_ver;
> +};
> +
> +struct mixer_drv_data {
> +	enum mixer_version_id	version;
>   };
>   
>   static const u8 filter_y_horiz_tap8[] = {
> @@ -1023,11 +1034,24 @@ fail:
>   	return ret;
>   }
>   
> +static struct mixer_drv_data exynos4_mxr_drv_data = {
> +	.version = MXR_VER_0_0_0_16,
> +};

Add one empty line.

> +static struct platform_device_id mixer_driver_types[] = {
> +	{
> +		.name		= "s5p-mixer",
> +		.driver_data	= (unsigned long)&exynos4_mxr_drv_data,
> +	}, {
> +		/* end node */
> +	}
> +};
> +
>   static int __devinit mixer_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct exynos_drm_hdmi_context *drm_hdmi_ctx;
>   	struct mixer_context *ctx;
> +	struct mixer_drv_data *drv;
>   	int ret;
>   
>   	dev_info(dev, "probe start\n");
> @@ -1047,8 +1071,11 @@ static int __devinit mixer_probe(struct platform_device *pdev)
>   
>   	mutex_init(&ctx->mixer_mutex);
>   
> +	drv = (struct mixer_drv_data *)platform_get_device_id(
> +			pdev)->driver_data;
>   	ctx->dev = &pdev->dev;
>   	drm_hdmi_ctx->ctx = (void *)ctx;
> +	ctx->mxr_ver = drv->version;
>   
>   	platform_set_drvdata(pdev, drm_hdmi_ctx);
>   
> @@ -1101,4 +1128,5 @@ struct platform_driver mixer_driver = {
>   	},
>   	.probe = mixer_probe,
>   	.remove = __devexit_p(mixer_remove),
> +	.id_table	= mixer_driver_types,
>   };

  reply	other threads:[~2012-10-02  7:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 14:25 [PATCH 00/14] drm: exynos: hdmi: add dt based support for exynos5 hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 01/14] media: s5p-hdmi: add HPD GPIO to platform data Rahul Sharma
2012-09-28 14:25 ` [PATCH 02/14] drm: exynos: hdmi: support for platform variants Rahul Sharma
2012-09-28 14:25 ` [PATCH 03/14] drm: exynos: hdmi: fix interrupt handling Rahul Sharma
2012-09-28 14:25 ` [PATCH 04/14] drm: exynos: hdmi: use s5p-hdmi platform data Rahul Sharma
2012-09-28 14:25 ` [PATCH 05/14] drm: exynos: hdmi: turn off HPD interrupt in HDMI chip Rahul Sharma
2012-09-28 14:25 ` [PATCH 06/14] drm: exynos: remove drm hdmi platform data struct Rahul Sharma
2012-09-28 14:25 ` [PATCH 07/14] drm: exynos: hdmi: add support for exynos5 ddc Rahul Sharma
2012-09-28 14:25 ` [PATCH 08/14] drm: exynos: hdmi: add support for exynos5 hdmiphy Rahul Sharma
2012-09-28 14:25 ` [PATCH 09/14] drm: exynos: hdmi: add support for platform variants for mixer Rahul Sharma
2012-10-02  7:26   ` Joonyoung Shim [this message]
2012-09-28 14:25 ` [PATCH 10/14] drm: exynos: hdmi: add support to disable video processor in mixer Rahul Sharma
2012-09-28 14:25 ` [PATCH 11/14] drm: exynos: hdmi: add support for exynos5 mixer Rahul Sharma
2012-10-02  7:27   ` Joonyoung Shim
2012-09-28 14:25 ` [PATCH 12/14] drm: exynos: hdmi: replace is_v13 with version check in hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 13/14] drm: exynos: hdmi: add support for exynos5 hdmi Rahul Sharma
2012-09-28 14:25 ` [PATCH 14/14] drm: exynos: hdmi: remove drm common hdmi platform data struct Rahul Sharma
2012-10-02  2:28 ` [PATCH 00/14] drm: exynos: hdmi: add dt based support for exynos5 hdmi Kyungmin Park
2012-10-02  7:31 ` Joonyoung Shim

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=506A9742.5050900@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fahad.k@samsung.com \
    --cc=joshi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.krishna@samsung.com \
    --cc=prashanth.g@samsung.com \
    --cc=rahul.sharma@samsung.com \
    --cc=s.shirish@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 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.