From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v4 4/8] drm: Add driver-private objects to atomic state
Date: Thu, 23 Mar 2017 09:54:42 +0100 [thread overview]
Message-ID: <868dc6c4-46a4-c34d-176c-190c8317cb15@linux.intel.com> (raw)
In-Reply-To: <1490217867.13532.29.camel@dk-H97M-D3H>
Op 22-03-17 om 22:05 schreef Pandiyan, Dhinakaran:
> On Wed, 2017-03-22 at 11:00 +0100, Maarten Lankhorst wrote:
>> Op 16-03-17 om 08:10 schreef Dhinakaran Pandiyan:
>>> From: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
>>>
>>> It is necessary to track states for objects other than connector, crtc
>>> and plane for atomic modesets. But adding objects like DP MST link
>>> bandwidth to drm_atomic_state would mean that a non-core object will be
>>> modified by the core helper functions for swapping and clearing
>>> it's state. So, lets add void * objects and helper functions that operate
>>> on void * types to keep these objects and states private to the core.
>>> Drivers can then implement specific functions to swap and clear states.
>>> The other advantage having just void * for these objects in
>>> drm_atomic_state is that objects of different types can be managed in the
>>> same state array.
>>>
>>> v2: Added docs and new iterator to filter private objects (Daniel)
>>> v3: Macro alignment (Chris)
>>>
>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Cc: Archit Taneja <architt@codeaurora.org>
>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Harry Wentland <Harry.wentland@amd.com>
>>> Acked-by: Harry Wentland <harry.wentland@amd.com>
>>> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
>> Mostly looks good, but too many null checks. I think it's best to get rid of them all
>> by freeing state->driver_private in default_clear() or setting num_private_objs to 0.
>> It would remove the need for all null checks I think..
>>
>> ~Maarten
>>
> Did you mean the NULL checks in this loop inside
> drm_atomic_get_private_obj_state()
>
> + for (i = 0; i < state->num_private_objs; i++)
> + if (obj == state->private_objs[i].obj &&
> + state->private_objs[i].obj_state)
> + return state->private_objs[i].obj_state;
>
> and the fact that I am not setting num_private_objs = 0 in
> drm_atomic_state_default_clear() ?
All of them, the NULL check in default_clear goes away, same for get_private_obj_state, and __for_each_private_obj
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-03-23 8:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 7:10 [PATCH v4 0/8] Adding driver-private objects to atomic state Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 1/8] drm/dp: Kill total_pbn and total_slots in struct drm_dp_mst_topology_mgr Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 2/8] drm/dp: Kill unused MST vcpi slot availability tracking Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 3/8] drm/dp: Split drm_dp_mst_allocate_vcpi Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 4/8] drm: Add driver-private objects to atomic state Dhinakaran Pandiyan
2017-03-22 10:00 ` Maarten Lankhorst
2017-03-22 21:05 ` Pandiyan, Dhinakaran
2017-03-23 8:54 ` Maarten Lankhorst [this message]
2017-03-22 22:30 ` [PATCH v5 " Dhinakaran Pandiyan
2017-03-27 6:16 ` Maarten Lankhorst
2017-03-27 6:38 ` Daniel Vetter
2017-03-27 8:28 ` Maarten Lankhorst
2017-03-27 8:31 ` Daniel Vetter
2017-03-27 8:35 ` Maarten Lankhorst
2017-03-27 18:24 ` Pandiyan, Dhinakaran
2017-03-16 7:10 ` [PATCH v4 5/8] drm/dp: Introduce MST topology state to track available link bandwidth Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 6/8] drm/dp: Add DP MST helpers to atomically find and release vcpi slots Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 7/8] drm: Connector helper function to release resources Dhinakaran Pandiyan
2017-03-16 8:27 ` Daniel Vetter
2017-03-16 22:43 ` [PATCH v5 " Dhinakaran Pandiyan
2017-03-16 7:10 ` [PATCH v4 8/8] drm/dp: Track MST link bandwidth Dhinakaran Pandiyan
2017-03-22 12:30 ` Maarten Lankhorst
2017-03-22 20:42 ` Pandiyan, Dhinakaran
2017-03-22 20:48 ` Daniel Vetter
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=868dc6c4-46a4-c34d-176c-190c8317cb15@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dhinakaran.pandiyan@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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 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).