public inbox for linux-samsung-soc@vger.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	Gustavo Padovan <gustavo@padovan.org>
Cc: linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org, inki.dae@samsung.com
Subject: Re: [PATCH v10 02/17] drm/exynos: use adjusted_mode of crtc_state instead of mode
Date: Tue, 02 Jun 2015 09:03:29 +0900	[thread overview]
Message-ID: <556CF2D1.1000709@samsung.com> (raw)
In-Reply-To: <519a97890c97fc23d5980ab1a70b1c3d@math.uni-bielefeld.de>

On 06/02/2015 12:09 AM, Tobias Jakobi wrote:
> Hello,
> 
> as pointed out in [1] before, this gives me an kernel oops during boot.
> 
> With best wishes,
> Tobias
> 
> [1] http://www.spinics.net/lists/linux-samsung-soc/msg44736.html
> 

Yeah, this patch should go after switched by drm_helper_crtc_mode_set,
e.g. after the patch "drm/exynos: atomic phase 1: add .mode_set_nofb()
callback". Then crtc->base.state cannot be NULL.

Gustavo, sorry for that, i meant rebase based on the patch "drm/exynos:
atomic phase 1: add .mode_set_nofb() callback"

Inki, i think it's time to merge this patchset for switch to atomic
modeset functions if no any objection, just need to rebase of this patch
based on the patch "drm/exynos: atomic phase 1 : add .mode_set_nofb()
callback" and except a patch 17/17 from this merge, i think clean up
patches like it need to more review after merge atomic patchset.

Thanks.

> 
> On 2015-06-01 17:04, Gustavo Padovan wrote:
>> From: Joonyoung Shim <jy0922.shim@samsung.com>
>>
>> Handle changes by removing copy from adjusted_mode to mode as using
>> adjusted_mode of crtc_state.
>>
>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos7_drm_decon.c |  4 ++--
>>  drivers/gpu/drm/exynos/exynos_drm_fimd.c   |  2 +-
>>  drivers/gpu/drm/exynos/exynos_drm_plane.c  | 13 +++++++------
>>  3 files changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> index 6714e5b..f29e4be 100644
>> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> @@ -175,7 +175,7 @@ static bool decon_mode_fixup(struct exynos_drm_crtc *crtc,
>>  static void decon_commit(struct exynos_drm_crtc *crtc)
>>  {
>>      struct decon_context *ctx = crtc->ctx;
>> -    struct drm_display_mode *mode = &crtc->base.mode;
>> +    struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
>>      u32 val, clkdiv;
>>
>>      if (ctx->suspended)
>> @@ -395,7 +395,7 @@ static void decon_shadow_protect_win(struct
>> decon_context *ctx,
>>  static void decon_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
>>  {
>>      struct decon_context *ctx = crtc->ctx;
>> -    struct drm_display_mode *mode = &crtc->base.mode;
>> +    struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
>>      struct exynos_drm_plane *plane;
>>      int padding;
>>      unsigned long val, alpha;
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index a0edab8..b326b31 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -337,7 +337,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc,
>>  static void fimd_commit(struct exynos_drm_crtc *crtc)
>>  {
>>      struct fimd_context *ctx = crtc->ctx;
>> -    struct drm_display_mode *mode = &crtc->base.mode;
>> +    struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
>>      struct fimd_driver_data *driver_data = ctx->driver_data;
>>      void *timing_base = ctx->regs + driver_data->timing_base;
>>      u32 val, clkdiv;
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c
>> b/drivers/gpu/drm/exynos/exynos_drm_plane.c
>> index b1180fb..01d2918 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
>> @@ -92,11 +92,12 @@ void exynos_plane_mode_set(struct drm_plane
>> *plane, struct drm_crtc *crtc,
>>                uint32_t src_w, uint32_t src_h)
>>  {
>>      struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
>> +    struct drm_display_mode *mode = &crtc->state->adjusted_mode;
>>      unsigned int actual_w;
>>      unsigned int actual_h;
>>
>> -    actual_w = exynos_plane_get_size(crtc_x, crtc_w, crtc->mode.hdisplay);
>> -    actual_h = exynos_plane_get_size(crtc_y, crtc_h, crtc->mode.vdisplay);
>> +    actual_w = exynos_plane_get_size(crtc_x, crtc_w, mode->hdisplay);
>> +    actual_h = exynos_plane_get_size(crtc_y, crtc_h, mode->vdisplay);
>>
>>      if (crtc_x < 0) {
>>          if (actual_w)
>> @@ -132,10 +133,10 @@ void exynos_plane_mode_set(struct drm_plane
>> *plane, struct drm_crtc *crtc,
>>      exynos_plane->crtc_height = actual_h;
>>
>>      /* set drm mode data. */
>> -    exynos_plane->mode_width = crtc->mode.hdisplay;
>> -    exynos_plane->mode_height = crtc->mode.vdisplay;
>> -    exynos_plane->refresh = crtc->mode.vrefresh;
>> -    exynos_plane->scan_flag = crtc->mode.flags;
>> +    exynos_plane->mode_width = mode->hdisplay;
>> +    exynos_plane->mode_height = mode->vdisplay;
>> +    exynos_plane->refresh = mode->vrefresh;
>> +    exynos_plane->scan_flag = mode->flags;
>>
>>      DRM_DEBUG_KMS("plane : offset_x/y(%d,%d), width/height(%d,%d)",
>>              exynos_plane->crtc_x, exynos_plane->crtc_y,
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2015-06-02  0:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 15:04 [PATCH v10 00/17] drm/exynos: atomic modesetting support Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 01/17] drm/exynos: fix source data argument for plane Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 02/17] drm/exynos: use adjusted_mode of crtc_state instead of mode Gustavo Padovan
2015-06-01 15:09   ` Tobias Jakobi
2015-06-02  0:03     ` Joonyoung Shim [this message]
2015-06-02 12:12       ` Inki Dae
2015-06-02 14:09         ` Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 03/17] drm/exynos: atomic phase 1: use drm_plane_helper_update() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 04/17] drm/exynos: atomic phase 1: use drm_plane_helper_disable() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 05/17] drm/exynos: atomic phase 1: add .mode_set_nofb() callback Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 06/17] drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 07/17] drm/exynos: atomic phase 2: keep track of framebuffer pointer Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 08/17] drm/exynos: atomic phase 3: atomic updates of planes Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 09/17] drm/exynos: atomic phase 3: use atomic .set_config helper Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 10/17] drm/exynos: atomic phase 3: convert page flips Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 11/17] drm/exynos: remove exported functions from exynos_drm_plane Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 12/17] drm/exynos: don't disable unused functions at init Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 13/17] drm/exynos: move exynos_drm_crtc_disable() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 14/17] drm/exynos: add exynos specific .atomic_commit() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 15/17] drm/exynos: atomic dpms support Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 16/17] drm/exynos: remove unnecessary calls to disable_plane() Gustavo Padovan
2015-06-01 15:04 ` [PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable() Gustavo Padovan
2015-06-02 12:09   ` Inki Dae
2015-06-02 14:06     ` Gustavo Padovan
2015-06-02 14:19       ` Javier Martinez Canillas
2015-06-03  1:08         ` Inki Dae
2015-06-03  7:53   ` Inki Dae
2015-06-03 13:20     ` Gustavo Padovan
2015-06-10 10:03 ` [PATCH v10 00/17] drm/exynos: atomic modesetting support Marek Szyprowski
2015-06-10 10:59   ` Inki Dae
2015-06-10 11:38     ` Marek Szyprowski
2015-06-10 12:08       ` Inki Dae
2015-06-10 13:36   ` Gustavo Padovan
2015-06-11  6:21     ` Joonyoung Shim
2015-06-11 14:01       ` Gustavo Padovan
2015-06-12  8:32         ` Joonyoung Shim
2015-06-15  6:09 ` Inki Dae
2015-06-16 20:35   ` Gustavo Padovan
2015-06-17 13:00     ` Inki Dae
2015-06-17 14:33       ` Gustavo Padovan
2015-06-18  4:36         ` Inki Dae
2015-06-19 12:20         ` Inki Dae

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=556CF2D1.1000709@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=inki.dae@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /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