All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Kristian Høgsberg" <hoegsberg@gmail.com>
Cc: "Kristian H. Kristensen" <hoegsberg@chromium.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [v2] drm/rockchip: Use an enum to identify Rockchip VOPs
Date: Tue, 8 Nov 2016 13:06:28 -0800	[thread overview]
Message-ID: <20161108210628.GA11480@roeck-us.net> (raw)
In-Reply-To: <1478202408-11635-1-git-send-email-hoegsberg@chromium.org>

On Thu, Nov 03, 2016 at 12:46:48PM -0700, Kristian Høgsberg wrote:
> We used to call drm_of_encoder_active_endpoint_id() from
> rockchip_dp_drm_encoder_atomic_check() to determine the endpoint for the
> active encoder. However, the encoder isn't necessarily active at this
> point or it may be connected to different crtc than what we're switching
> to. Instead, look at the crtc from the drm_crtc_state.  This fixes wrong
> colors when driving the eDP with the big VOP.  Further, we can identify
> the type of VOP we're dealing with by just putting a VOP id enum in the
> vop_data.
> 
> On way to test this is to use the modetest tool from libdrm:
> 
>   $ modetest -M rockchip -s 32@28:2400x1600
> 
> which displays dark or black colors because we fail to look up the
> endpoint and use default 0 (which is ROCKCHIP_OUT_MODE_P888) for big
> VOP instead of RGB10 as required.
> 
> For reference,
> 
>   $ modetest -M rockchip -s 32@25:2400x1600
> 
> drives the eDP from little VOP and displays correctly.
> 
> Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
> ---
> v2: Stripped chromeos annotations, fix compile errors for drivers I didn't
> compile when I first wrote the patch.
> 

[ ... ]

>  
> +enum vop_id vop_get_crtc_vop_id(struct drm_crtc *crtc)
> +{
> +	struct vop *vop = to_vop(crtc);
> +
> +	return vop->data->id;
> +}

Missing EXPORT() causes build errors if calling code is built as module.

Example arm64:allmodconfig:

ERROR: "vop_get_crtc_vop_id" [drivers/gpu/drm/rockchip/dw-mipi-dsi.ko] undefined!
ERROR: "vop_get_crtc_vop_id" [drivers/gpu/drm/rockchip/cdn-dp.ko] undefined!
ERROR: "vop_get_crtc_vop_id" [drivers/gpu/drm/rockchip/analogix_dp-rockchip.ko] undefined!

Guenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-11-08 21:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 19:46 [PATCH v2] drm/rockchip: Use an enum to identify Rockchip VOPs Kristian H. Kristensen
2016-11-08 21:06 ` Guenter Roeck [this message]
2017-10-18 17:52 ` Brian Norris
2017-10-19  0:49   ` Mark yao
2017-10-19 17:46     ` Kristian Høgsberg
2017-10-20  1:38       ` Mark yao

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=20161108210628.GA11480@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hoegsberg@chromium.org \
    --cc=hoegsberg@gmail.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.