All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark yao <mark.yao@rock-chips.com>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	linux-doc@vger.kernel.org, kever.yang@rock-chips.com,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	xjq@rock-chips.com, zyw@rock-chips.com,
	linux-api@vger.kernel.org, "jeff chen" <cym@rock-chips.com>,
	linux-rockchip@lists.infradead.org, kfx@rock-chips.com,
	"Grant Likely" <grant.likely@linaro.org>,
	wxt@rock-chips.com, huangtao@rock-chips.com,
	devicetree@vger.kernel.org, "Pawel Moll" <pawel.moll@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	yxj@rock-chips.com, "Eddie Cai" <cf@rock-chips.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"simon xue" <xxm@rock-chips.com>,
	xw@rock-chips.com,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.or>
Subject: Re: [PATCH v5 1/3] drm/rockchip: Add basic drm driver
Date: Thu, 25 Sep 2014 20:11:39 +0800	[thread overview]
Message-ID: <5424067B.7090908@rock-chips.com> (raw)
In-Reply-To: <5423D951.4030703@rock-chips.com>


[-- Attachment #1.1: Type: text/plain, Size: 2092 bytes --]

On 2014年09月25日 16:58, Mark yao wrote:
> On 2014年09月25日 00:20, Daniel Kurtz wrote:
>> Hi Mark,
>>
>> Please review comments inline...
>>
>> On Wed, Sep 24, 2014 at 10:12 AM, Mark yao<mark.yao@rock-chips.com>  wrote:
>> To match the enum name, use ROCKCHIP_OUTPUT_TYPE_*.
>> Also, no need to explicitly set the first one to 0.
>> However, see below.  I don't think we to modify the drm_display_mode
>> to include an output type.
> but vop devices need know the connector type, connector enable 
> register is in vop.
> can I do that like under to  get connector type for crtc?
>
>     static int rockchip_get_connector_type(struct drm_crtc *crtc)
>     {
>           struct drm_device *dev = crtc->dev;
>           struct drm_connector * connector;
>
>           list_for_each_entry(connector, 
> &dev->mode_config.connector_list, head) {
>           if (!connector->encoder)
>                   continue;
>           /*
>            * one crtc only has one connector in my case, so just find 
> the first connector at list.
>            */
>           if (connector->encoder->crtc == crtc)
>                   break;
>     }
>
>     if (!connector)
>             return -EINVAL;
>
>     return connector->connector_type;
> } 
Oh, sorry, forgot to drop this comment,
for connector type problem, I try to new a help function for encoder to 
call as Daniel advices.
>>>
>>> +#define to_rockchip_plane(x) container_of(x, struct rockchip_plane, base)
>>> +
>>> +struct rockchip_plane {
>>> +       int id;
>>> +       struct drm_plane base;
>>> +       const struct vop_win *win;
>>> +       struct vop_context *ctx;
>> Isn't ctx just: to_vop_ctx(base->crtc)
>>
> OK. we can use to_vop_ctx(base->crtc) to get ctx. 
I have do a test to use "to_vop_ctx(base->crtc)", but found that 
"base->crtc" maybe not init.
for cursor plane, base->crtc always is NULL. and disable_plane will fail.
maybe we can add "base->crtc = crtc" at update_plane, but it seems not good.
so I think still use "rockchip_plane->ctx" would be better.

-Mark

[-- Attachment #1.2: Type: text/html, Size: 3942 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2014-09-25 12:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24  2:11 [PATCH v5 0/3] Add drm driver for Rockchip Socs Mark yao
2014-09-24  2:11 ` Mark yao
2014-09-24  2:12 ` [PATCH v5 1/3] drm/rockchip: Add basic drm driver Mark yao
2014-09-24 16:20   ` Daniel Kurtz
2014-09-24 16:20     ` Daniel Kurtz
2014-09-25  8:58     ` Mark yao
2014-09-25 12:11       ` Mark yao [this message]
2014-09-26  1:26         ` Mark yao
2014-09-25 23:56   ` Rob Clark
2014-09-25 23:56     ` Rob Clark
2014-09-24  2:13 ` [PATCH v5 2/3] dt-bindings: video: Add for rockchip display subsytem Mark yao
2014-09-24  2:13   ` Mark yao
2014-09-24  2:13 ` [PATCH v5 3/3] dt-bindings: video: Add documentation for rockchip vop 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=5424067B.7090908@rock-chips.com \
    --to=mark.yao@rock-chips.com \
    --cc=cf@rock-chips.com \
    --cc=cym@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djkurtz@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kever.yang@rock-chips.com \
    --cc=kfx@rock-chips.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=marcheu@chromium.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rdunlap@infradead.or \
    --cc=robh+dt@kernel.org \
    --cc=wxt@rock-chips.com \
    --cc=xjq@rock-chips.com \
    --cc=xw@rock-chips.com \
    --cc=xxm@rock-chips.com \
    --cc=yxj@rock-chips.com \
    --cc=zyw@rock-chips.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.