All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: "Meghana Madhyastha" <meghana.madhyastha@gmail.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
	jani.nikula@linux.intel.com, seanpaul@chromium.org
Subject: Re: [Outreachy kernel] [PATCH v14 2/3] drm/tinydrm: Move tinydrm_of_find_backlight to backlight.c
Date: Thu, 7 Dec 2017 15:44:04 +0000	[thread overview]
Message-ID: <77f23ae2-93ff-b092-bfa7-621265739635@linaro.org> (raw)
In-Reply-To: <20171206104324.GB15011@meghana-HP-Pavilion-Notebook>

On 06/12/17 10:43, Meghana Madhyastha wrote:
> On Tue, Oct 24, 2017 at 06:45:34PM +0200, Noralf Trønnes wrote:
>>
>> Den 24.10.2017 17.42, skrev Sean Paul:
>>> On Sat, Oct 21, 2017 at 05:27:33PM +0530, Meghana Madhyastha wrote:
>>>> Rename tinydrm_of_find_backlight to of_find_backlight and move
>>>> it to linux/backlight.c so that it can be used by other drivers.
>>>>
>>>> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
>>>> ---
>>>> Changes in v14:
>>>>   -s/backlight_get/of_find_backlight/
>>>>
>>>>   drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 40 --------------------------
>>>>   drivers/gpu/drm/tinydrm/mi0283qt.c             |  3 +-
>>>>   drivers/video/backlight/backlight.c            | 37 ++++++++++++++++++++++++
>>>>   include/drm/tinydrm/tinydrm-helpers.h          |  2 --
>>>>   include/linux/backlight.h                      | 19 ++++++++++++
>>>>   5 files changed, 58 insertions(+), 43 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
>>>> index a42dee6..cb1a01a 100644
>>>> --- a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
>>>> +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
>>>> @@ -236,46 +236,6 @@ void tinydrm_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb,
>>>>   }
>>>>   EXPORT_SYMBOL(tinydrm_xrgb8888_to_gray8);
>>>> -/**
>>>> - * tinydrm_of_find_backlight - Find backlight device in device-tree
>>>> - * @dev: Device
>>>> - *
>>>> - * This function looks for a DT node pointed to by a property named 'backlight'
>>>> - * and uses of_find_backlight_by_node() to get the backlight device.
>>>> - * Additionally if the brightness property is zero, it is set to
>>>> - * max_brightness.
>>>> - *
>>>> - * Returns:
>>>> - * NULL if there's no backlight property.
>>>> - * Error pointer -EPROBE_DEFER if the DT node is found, but no backlight device
>>>> - * is found.
>>>> - * If the backlight device is found, a pointer to the structure is returned.
>>>> - */
>>>> -struct backlight_device *tinydrm_of_find_backlight(struct device *dev)
>>>> -{
>>>> -	struct backlight_device *backlight;
>>>> -	struct device_node *np;
>>>> -
>>>> -	np = of_parse_phandle(dev->of_node, "backlight", 0);
>>>> -	if (!np)
>>>> -		return NULL;
>>>> -
>>>> -	backlight = of_find_backlight_by_node(np);
>>>> -	of_node_put(np);
>>>> -
>>>> -	if (!backlight)
>>>> -		return ERR_PTR(-EPROBE_DEFER);
>>>> -
>>>> -	if (!backlight->props.brightness) {
>>>> -		backlight->props.brightness = backlight->props.max_brightness;
>>>> -		DRM_DEBUG_KMS("Backlight brightness set to %d\n",
>>>> -			      backlight->props.brightness);
>>>> -	}
>>>> -
>>>> -	return backlight;
>>>> -}
>>>> -EXPORT_SYMBOL(tinydrm_of_find_backlight);
>>>> -
>>>>   #if IS_ENABLED(CONFIG_SPI)
>>>>   /**
>>>> diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
>>>> index 7fd2691..53ab5a0 100644
>>>> --- a/drivers/gpu/drm/tinydrm/mi0283qt.c
>>>> +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
>>>> @@ -12,6 +12,7 @@
>>>>   #include <drm/tinydrm/ili9341.h>
>>>>   #include <drm/tinydrm/mipi-dbi.h>
>>>>   #include <drm/tinydrm/tinydrm-helpers.h>
>>>> +#include <linux/backlight.h>
>>>>   #include <linux/delay.h>
>>>>   #include <linux/gpio/consumer.h>
>>>>   #include <linux/module.h>
>>>> @@ -188,7 +189,7 @@ static int mi0283qt_probe(struct spi_device *spi)
>>>>   	if (IS_ERR(mipi->regulator))
>>>>   		return PTR_ERR(mipi->regulator);
>>>> -	mipi->backlight = tinydrm_of_find_backlight(dev);
>>>> +	mipi->backlight = of_find_backlight(dev);
>>> Sorry for the follow-up spam, but are you missing the put_device somewhere? The
>>> next patch uses devm_of_find_backlight. So AFAICT you're either leaking a reference
>>> here, or you're closing an additional reference in the next patch.
>>
>> This is my fault, put_device() has been missing all along, so Meghana is
>> plugging that hole,
>> in the next patch :-)
>>
>> Noralf.
> 
> Is there anything else that needs to be done for this patch ? If not,
> and it is ready, can this be acked ? It seems to have been stuck for
> some time now and I will definitely fix anything that needs to be fixed
> in this patch ASAP.

I've lost track a little but have two questions:

1. Is there any pending feedback? If not a resend might be sensible.

2. Which maintainers are you expecting to pick up the patch? It looks to
    me like lots of people are be missing from the To: fields (compared
    to what I think get_maintainer.pl would give you) meaning the patches
    won't get picked up.


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

  reply	other threads:[~2017-12-07 15:44 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-21 11:55 [PATCH v14 0/3] Move backlight helper functions from tinydrm-helpers to linux/backlight Meghana Madhyastha
2017-10-21 11:55 ` Meghana Madhyastha
2017-10-21 11:56 ` [PATCH v14 1/3] drm/tinydrm: Move helper functions from tinydrm-helpers to backlight.h Meghana Madhyastha
2017-10-21 11:56   ` Meghana Madhyastha
2017-10-24 15:37   ` [Outreachy kernel] " Sean Paul
2017-10-24 15:37     ` Sean Paul
2017-10-21 11:57 ` [PATCH v14 2/3] drm/tinydrm: Move tinydrm_of_find_backlight to backlight.c Meghana Madhyastha
2017-10-21 11:57   ` Meghana Madhyastha
2017-10-24 15:38   ` [Outreachy kernel] " Sean Paul
2017-10-24 15:38     ` Sean Paul
2017-10-24 15:56     ` Daniel Thompson
2017-10-24 15:56       ` Daniel Thompson
2017-10-25  7:39       ` Sean Paul
2017-10-25  7:39         ` Sean Paul
2017-10-27 15:12         ` Daniel Thompson
2017-10-27 15:12           ` Daniel Thompson
2017-10-24 15:42   ` Sean Paul
2017-10-24 15:42     ` Sean Paul
2017-10-24 16:45     ` Noralf Trønnes
2017-10-24 16:45       ` Noralf Trønnes
2017-12-06 10:43       ` Meghana Madhyastha
2017-12-07 15:44         ` Daniel Thompson [this message]
2017-12-07 16:01           ` Noralf Trønnes
2017-12-08  8:52             ` Daniel Vetter
2017-10-21 11:59 ` [PATCH v14 3/3] drm/tinydrm: Add devres versions of of_find_backlight Meghana Madhyastha
2017-10-21 11:59   ` Meghana Madhyastha
2017-10-23 10:34 ` [PATCH v14 0/3] Move backlight helper functions from tinydrm-helpers to linux/backlight Daniel Thompson
2017-10-23 10:34   ` Daniel Thompson
2017-12-09 14:09 ` Noralf Trønnes
2017-12-09 14:09   ` Noralf Trønnes
2017-12-11 13:17   ` Meghana Madhyastha
2017-12-11 14:12     ` Noralf Trønnes
2017-12-11 14:58       ` Meghana Madhyastha
2017-12-11 17:45         ` Noralf Trønnes
2017-12-11 17:56           ` Noralf Trønnes
2017-12-21 10:52             ` Noralf Trønnes
2017-12-21 13:05               ` Daniel Vetter
2017-12-21 13:44                 ` Noralf Trønnes
2017-12-21 14:08                   ` Daniel Vetter
2017-12-21 17:06                     ` Noralf Trønnes
2018-01-09 13:50                     ` Rob Herring
2017-12-26  6:39               ` Meghana Madhyastha
2018-01-02 17:23                 ` Noralf Trønnes

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=77f23ae2-93ff-b092-bfa7-621265739635@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=meghana.madhyastha@gmail.com \
    --cc=noralf@tronnes.org \
    --cc=seanpaul@chromium.org \
    /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.