* [PATCH] drm/komeda: Add ACLK rate to sysfs
@ 2019-08-28 11:03 Mihail Atanassov
2019-08-28 14:15 ` james qian wang (Arm Technology China)
0 siblings, 1 reply; 3+ messages in thread
From: Mihail Atanassov @ 2019-08-28 11:03 UTC (permalink / raw)
Cc: Mihail Atanassov, nd, james qian wang (Arm Technology China),
Liviu Dudau, Brian Starkey, David Airlie, Daniel Vetter,
dri-devel, linux-kernel
Expose node with the name 'aclk_hz'
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
index 0142ee991957..e8d67395a3b9 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
@@ -91,9 +91,19 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf)
}
static DEVICE_ATTR_RO(config_id);
+static ssize_t
+aclk_hz_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct komeda_dev *mdev = dev_to_mdev(dev);
+
+ return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk));
+}
+static DEVICE_ATTR_RO(aclk_hz);
+
static struct attribute *komeda_sysfs_entries[] = {
&dev_attr_core_id.attr,
&dev_attr_config_id.attr,
+ &dev_attr_aclk_hz.attr,
NULL,
};
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/komeda: Add ACLK rate to sysfs
2019-08-28 11:03 [PATCH] drm/komeda: Add ACLK rate to sysfs Mihail Atanassov
@ 2019-08-28 14:15 ` james qian wang (Arm Technology China)
2019-09-03 13:46 ` Ayan Halder
0 siblings, 1 reply; 3+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-08-28 14:15 UTC (permalink / raw)
To: Mihail Atanassov
Cc: nd, Liviu Dudau, Brian Starkey, David Airlie, Daniel Vetter,
dri-devel, linux-kernel
Hi Mihail:
Looks good to me.
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
James.
On Wed, Aug 28, 2019 at 11:03:49AM +0000, Mihail Atanassov wrote:
> Expose node with the name 'aclk_hz'
>
> Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> index 0142ee991957..e8d67395a3b9 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> @@ -91,9 +91,19 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf)
> }
> static DEVICE_ATTR_RO(config_id);
>
> +static ssize_t
> +aclk_hz_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> + struct komeda_dev *mdev = dev_to_mdev(dev);
> +
> + return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk));
> +}
> +static DEVICE_ATTR_RO(aclk_hz);
> +
> static struct attribute *komeda_sysfs_entries[] = {
> &dev_attr_core_id.attr,
> &dev_attr_config_id.attr,
> + &dev_attr_aclk_hz.attr,
> NULL,
> };
>
> --
> 2.22.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/komeda: Add ACLK rate to sysfs
2019-08-28 14:15 ` james qian wang (Arm Technology China)
@ 2019-09-03 13:46 ` Ayan Halder
0 siblings, 0 replies; 3+ messages in thread
From: Ayan Halder @ 2019-09-03 13:46 UTC (permalink / raw)
To: james qian wang (Arm Technology China)
Cc: Mihail Atanassov, David Airlie, Liviu Dudau, linux-kernel, dri-devel, nd
On Wed, Aug 28, 2019 at 02:15:15PM +0000, james qian wang (Arm Technology China) wrote:
> Hi Mihail:
>
> Looks good to me.
>
> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
>
Pushed to drm-misc-next 5fcd055193c5d4cac6d205bd65e52c957ea057c2
And that verifies my new dim setup. :)
> James.
>
> On Wed, Aug 28, 2019 at 11:03:49AM +0000, Mihail Atanassov wrote:
> > Expose node with the name 'aclk_hz'
> >
> > Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> > ---
> > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> > index 0142ee991957..e8d67395a3b9 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> > @@ -91,9 +91,19 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf)
> > }
> > static DEVICE_ATTR_RO(config_id);
> >
> > +static ssize_t
> > +aclk_hz_show(struct device *dev, struct device_attribute *attr, char *buf)
> > +{
> > + struct komeda_dev *mdev = dev_to_mdev(dev);
> > +
> > + return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk));
> > +}
> > +static DEVICE_ATTR_RO(aclk_hz);
> > +
> > static struct attribute *komeda_sysfs_entries[] = {
> > &dev_attr_core_id.attr,
> > &dev_attr_config_id.attr,
> > + &dev_attr_aclk_hz.attr,
> > NULL,
> > };
> >
> > --
> > 2.22.0
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-03 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 11:03 [PATCH] drm/komeda: Add ACLK rate to sysfs Mihail Atanassov
2019-08-28 14:15 ` james qian wang (Arm Technology China)
2019-09-03 13:46 ` Ayan Halder
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).