linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: lichenyang <lichenyang@loongson.cn>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	devel@linuxdriverproject.org, Huacai Chen <chenhuacai@kernel.org>,
	Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: Re: [PATCH v2 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip
Date: Mon, 19 Jul 2021 16:13:52 +0300	[thread overview]
Message-ID: <20210719131352.GU1931@kadam> (raw)
In-Reply-To: <20210715015809.107821-1-lichenyang@loongson.cn>

On Thu, Jul 15, 2021 at 09:58:07AM +0800, lichenyang wrote:
> +int loongson_crtc_init(struct loongson_device *ldev, int index)
> +{
> +	struct loongson_crtc *lcrtc;
> +	u32 ret;

This should be "int ret;"

> +
> +	lcrtc = kzalloc(sizeof(struct loongson_crtc), GFP_KERNEL);
> +	if (lcrtc == NULL)
> +		return -1;
> +
> +	lcrtc->ldev = ldev;
> +	lcrtc->reg_offset = index * REG_OFFSET;
> +	lcrtc->cfg_reg = CFG_RESET;
> +	lcrtc->crtc_id = index;
> +
> +	ret = loongson_plane_init(lcrtc);
> +	if (ret)
> +		return ret;
> +
> +	ret = drm_crtc_init_with_planes(ldev->dev, &lcrtc->base, lcrtc->plane,
> +					NULL, &loongson_crtc_funcs, NULL);
> +	if (ret) {
> +		DRM_ERROR("failed to init crtc %d\n", index);
> +		drm_plane_cleanup(lcrtc->plane);
> +		return ret;
> +	}
> +
> +	drm_crtc_helper_add(&lcrtc->base, &loongson_crtc_helper_funcs);
> +
> +	ldev->mode_info[index].crtc = lcrtc;
> +
> +	return 0;
> +}

[ snip ]

> +int loongson_modeset_init(struct loongson_device *ldev)
> +{
> +	struct drm_encoder *encoder;
> +	struct drm_connector *connector;
> +	int i;
> +	u32 ret;


Same.


> +
> +	ldev->dev->mode_config.allow_fb_modifiers = true;

regards,
dan carpenter

      parent reply	other threads:[~2021-07-19 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  1:58 [PATCH v2 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip lichenyang
2021-07-15  1:58 ` [PATCH v2 2/3] drm/loongson: Add GPIO and I2C driver for loongson drm lichenyang
2021-07-19  9:20   ` Dan Carpenter
2021-07-15  1:58 ` [PATCH v2 3/3] drm/loongson: Add interrupt driver for LS7A lichenyang
2021-07-19  9:58   ` Dan Carpenter
2021-07-19  9:53 ` [PATCH v2 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip Dan Carpenter
2021-07-19 13:13 ` Dan Carpenter [this message]

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=20210719131352.GU1931@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=airlied@linux.ie \
    --cc=chenhuacai@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devel@linuxdriverproject.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lichenyang@loongson.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).