From: Ezequiel Garcia <ezequiel@collabora.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
linux-media@vger.kernel.org,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: kernel@collabora.com, Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 1/5] media: coda: Print a nicer device registered message
Date: Thu, 25 Apr 2019 15:35:42 -0300 [thread overview]
Message-ID: <20190425183546.16244-2-ezequiel@collabora.com> (raw)
In-Reply-To: <20190425183546.16244-1-ezequiel@collabora.com>
This is just a cosmetic change to print a more descriptive
message, to distinguish decoder from encoder:
So, instead of printing
coda 2040000.vpu: codec registered as /dev/video[4-5]
With this change, the driver now prints
coda 2040000.vpu: encoder registered as /dev/video4
coda 2040000.vpu: decoder registered as /dev/video5
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
drivers/media/platform/coda/coda-common.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 3ce58dee4422..1f53ca4effd2 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2480,9 +2480,12 @@ static int coda_hw_init(struct coda_dev *dev)
static int coda_register_device(struct coda_dev *dev, int i)
{
struct video_device *vfd = &dev->vfd[i];
+ enum coda_inst_type type;
+ int ret;
if (i >= dev->devtype->num_vdevs)
return -EINVAL;
+ type = dev->devtype->vdevs[i]->type;
strscpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
vfd->fops = &coda_fops;
@@ -2498,7 +2501,12 @@ static int coda_register_device(struct coda_dev *dev, int i)
v4l2_disable_ioctl(vfd, VIDIOC_G_CROP);
v4l2_disable_ioctl(vfd, VIDIOC_S_CROP);
- return video_register_device(vfd, VFL_TYPE_GRABBER, 0);
+ ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
+ if (!ret)
+ v4l2_info(&dev->v4l2_dev, "%s registered as /dev/video%d\n",
+ type == CODA_INST_ENCODER ? "encoder" : "decoder",
+ vfd->num);
+ return ret;
}
static void coda_copy_firmware(struct coda_dev *dev, const u8 * const buf,
@@ -2612,9 +2620,6 @@ static void coda_fw_callback(const struct firmware *fw, void *context)
}
}
- v4l2_info(&dev->v4l2_dev, "codec registered as /dev/video[%d-%d]\n",
- dev->vfd[0].num, dev->vfd[i - 1].num);
-
pm_runtime_put_sync(&pdev->dev);
return;
--
2.20.1
next prev parent reply other threads:[~2019-04-25 18:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:35 [PATCH 0/5] Assorted CODA fixes Ezequiel Garcia
2019-04-25 18:35 ` Ezequiel Garcia [this message]
2019-04-25 18:39 ` [PATCH 1/5] media: coda: Print a nicer device registered message Hans Verkuil
2019-04-25 18:35 ` [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock Ezequiel Garcia
2019-04-26 7:58 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt Ezequiel Garcia
2019-04-26 7:59 ` Philipp Zabel
2019-04-26 9:16 ` Philipp Zabel
2019-04-26 17:56 ` Ezequiel Garcia
2019-04-29 9:13 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 4/5] media: coda: Remove pic_run_work worker Ezequiel Garcia
2019-04-26 8:11 ` Philipp Zabel
2019-04-26 18:19 ` Ezequiel Garcia
2019-04-29 9:55 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 5/5] media: coda: Clear the interrupt reason Ezequiel Garcia
2019-04-26 8:12 ` Philipp Zabel
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=20190425183546.16244-2-ezequiel@collabora.com \
--to=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.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