From patchwork Thu May 14 18:41:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6409361 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBD57C0432 for ; Thu, 14 May 2015 18:41:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC76B20444 for ; Thu, 14 May 2015 18:41:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 342982037C for ; Thu, 14 May 2015 18:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933511AbbENSlS (ORCPT ); Thu, 14 May 2015 14:41:18 -0400 Received: from mail-qg0-f48.google.com ([209.85.192.48]:35020 "EHLO mail-qg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933401AbbENSlR (ORCPT ); Thu, 14 May 2015 14:41:17 -0400 Received: by qgej70 with SMTP id j70so42065007qge.2 for ; Thu, 14 May 2015 11:41:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=OIaSJHhhxsccpMcznFUZ96/UUyaAgVu9idJaEl0eanE=; b=Zr9koptf+5onPhLkMqzSk/fxXQ/GiARpMOzfgpc1tjxkI1eseGIpxhCLnLIAdPvzi4 r8nkqaFaSoOfPZ+S6U/j9utUfrW5j8eoJSoWcDGFO7TTsuhD+nyYiYEs7YaN3pSf488O GkMXDRest00uuyzyEuhN2aQEbFMTSxVLq/BeTxQJMTltLjRkxdaNvcay74w8wDhg0dxT Bp22YDgZoXIVpvcyZvKyhhZ9YeZnJwfSzM2NLDpVGLWMtlEzBc38T78E4Il9J+c+E3DK I7St3UvbRoHWsbAhVfpUXXqKJUzRua9/TuFkrFZOBs5eyX3K48fsInPQQxHqkUn/Rh3T pJjA== X-Received: by 10.55.20.132 with SMTP id 4mr12285730qku.104.1431628876974; Thu, 14 May 2015 11:41:16 -0700 (PDT) Received: from localhost ([187.35.196.49]) by mx.google.com with ESMTPSA id g80sm18391006qkh.18.2015.05.14.11.41.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 11:41:16 -0700 (PDT) Date: Thu, 14 May 2015 15:41:13 -0300 From: Gustavo Padovan To: Inki Dae , Tobias Jakobi , "linux-samsung-soc@vger.kernel.org" , DRI mailing list Subject: Re: drm/exynos: Add atomic modesetting support Message-ID: <20150514184113.GB23061@joana> Mail-Followup-To: Gustavo Padovan , Inki Dae , Tobias Jakobi , "linux-samsung-soc@vger.kernel.org" , DRI mailing list References: <1430430651-22416-1-git-send-email-gustavo@padovan.org> <554D2FC7.1070208@gmx.net> <554DF9DE.7000200@gmx.net> <20150512182908.GB3327@joana> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150512182908.GB3327@joana> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Inki and Tobias, 2015-05-12 Gustavo Padovan : > 2015-05-10 Inki Dae : > > > 2015-05-09 21:13 GMT+09:00 Tobias Jakobi : > > > Hello Inki, > > > > > > > > > Inki Dae wrote: > > >> Hi, > > >> > > >> 2015-05-09 6:51 GMT+09:00 Tobias Jakobi : > > >>> Hello, > > >>> > > >>> I've tested this on my Hardkernel Odroid-X2 (connected via HDMI to a > > >>> 1080p panel). > > >>> > > >>> Run the usual modetest tests (just primary plane, primary plane with > > >>> vsync, primary plane with overlay, primary plane with overlay and video > > >>> overlay, overlay partially outside of crtc area, etc.) and haven't > > >>> noticed any issues so far. > > >> > > >> As I mentioned several times, it works well in case that only one crtc > > >> driver is enabled. Could you check it again after you enable two or > > >> more crtc drivers such as FIMD and HDMI or FIMD, HDMI and VIDI > > >> together? For this, dts file for X2 should contain their device nodes > > >> and also should be configurated though menuconfig. > > > I've enabled VIDI and FIMD and confirmed that they should up properly in > > > modetest before applying the series. > > > > > > Booting with the atomic series works fine, but I get a segfault when > > > calling modetest. I've attached the kernel log below. > > > > Below panic issue is same as one I faced with at previous patch seris, > > v3, which was invalid memory access - state->crtc is NULL whille > > modetest is being performed. It seems that the last patch of v4 didn't > > resolve this issue yet. > > The weird thing is that it works quite fine on my exynos 5 hardware. > I'll take a look on what could be be happening to cause this kind of > crash. Can you please check if the following diff solves the issue? iff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index 8a1cd8b..3d64799 100644 --- 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 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -163,6 +163,9 @@ static void exynos_plane_atomic_update(struct drm_plane *plane, struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(state->crtc); struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); + if (!state->crtc) + return; + exynos_plane_mode_set(plane, state->crtc, state->fb, state->crtc_x, state->crtc_y, state->crtc_w, state->crtc_h, @@ -179,6 +182,9 @@ static void exynos_plane_atomic_disable(struct drm_plane *plane, struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(old_state->crtc); + if (!old_state->crtc) + return; + if (exynos_crtc->ops->disable_plane) exynos_crtc->ops->disable_plane(exynos_crtc, exynos_plane->zpos);