All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 05/11] drm/fb-helper: Remove drm_fb_helper_crtc
Date: Wed, 15 May 2019 16:51:04 +0200	[thread overview]
Message-ID: <fd69d05d-0634-15cc-18e6-8c81c82aafef@tronnes.org> (raw)
In-Reply-To: <20190515090432.GA31712@ravnborg.org>

Hi Sam,

[looks like Thundebird decided to throw away my reply, so I'll try again]

Den 15.05.2019 11.04, skrev Sam Ravnborg:
> Hi Noralf.
> 
> I have read through the cahnes a copuple of times not and feel confident
> to add my r-b if the comments are considered.
> 
> On Mon, May 06, 2019 at 08:01:33PM +0200, Noralf Trønnes wrote:
>> It now only contains the modeset so use that directly instead and attach
>> a modeset array to drm_client_dev. drm_fb_helper will use this array.
>> Code will later be moved to drm_client, so add code there in a new file
>> drm_client_modeset.c with MIT license to match drm_fb_helper.c.
> 
> The first part of this commit log could use some re-pharsing.
> What is "It" etc.
> 

I could do this:

struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so
use that directly instead and attach it as a modeset array onto
drm_client_dev. drm_fb_helper will use this array to store its modesets
which means it will always initialize a drm_client, but it will not
register the client (callbacks) unless it's the generic fbdev emulation.

>> @@ -532,8 +535,7 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)
>>  						    DRM_MODE_ROTATE_0);
>>  	}
>>  
>> -	for (i = 0; i < fb_helper->crtc_count; i++) {
>> -		struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
>> +	drm_client_for_each_modeset(mode_set, client) {
>>  		struct drm_crtc *crtc = mode_set->crtc;
>>  
>>  		if (crtc->funcs->cursor_set2) {
> This function requires modeset_mutex to be held. Maybe add comment?
> 

drm_client_for_each_modeset() has a lockdep warn (courtesy of Daniel
Vetter):

#define drm_client_for_each_modeset(modeset, client) \
	for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
	     modeset = (client)->modesets; modeset->crtc; modeset++)

>> @@ -1842,7 +1805,7 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
>>  
>>  	pan_set(fb_helper, var->xoffset, var->yoffset);
>>  
>> -	ret = restore_fbdev_mode_atomic(fb_helper, true);
>> +	ret = restore_fbdev_mode_force(fb_helper);
> This change looks alien compared to other changes.
> Does it belong to this patchset?
> 

It's mentioned in the commit message:

In pan_display_atomic() restore_fbdev_mode_force() is used instead of
restore_fbdev_mode_atomic() because that one will later become internal
to drm_client_modeset.

Thanks for looking at this, I'll spin a new version.

Noralf.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-05-15 14:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:01 [PATCH v5 00/11] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 01/11] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 02/11] drm/fb-helper: Avoid race with DRM userspace Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 03/11] drm/fb-helper: No need to cache rotation and sw_rotations Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 04/11] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 05/11] drm/fb-helper: Remove drm_fb_helper_crtc Noralf Trønnes
2019-05-15  9:04   ` Sam Ravnborg
2019-05-15 14:35     ` Familien Trønnes
2019-05-15 14:51     ` Noralf Trønnes [this message]
2019-05-15 15:01       ` Sam Ravnborg
2019-05-06 18:01 ` [PATCH v5 06/11] drm/fb-helper: Prepare to move out commit code Noralf Trønnes
2019-05-15  9:07   ` Sam Ravnborg
2019-05-06 18:01 ` [PATCH v5 07/11] drm/fb-helper: Move " Noralf Trønnes
2019-05-15  9:09   ` Sam Ravnborg
2019-05-15 14:40     ` Noralf Trønnes
2019-05-06 18:01 ` [PATCH v5 08/11] drm/fb-helper: Remove drm_fb_helper_connector Noralf Trønnes
2019-05-16 13:07   ` Sam Ravnborg
2019-05-16 13:53     ` Noralf Trønnes
2019-05-16 15:36       ` Sam Ravnborg
2019-05-06 18:01 ` [PATCH v5 09/11] drm/fb-helper: Prepare to move out modeset config code Noralf Trønnes
2019-05-15  9:14   ` Sam Ravnborg
2019-05-06 18:01 ` [PATCH v5 10/11] drm/fb-helper: Move " Noralf Trønnes
2019-05-16 15:38   ` Sam Ravnborg
2019-05-06 18:01 ` [PATCH v5 11/11] drm/client: Hack: Add bootsplash example Noralf Trønnes
2019-05-06 18:40 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev6) Patchwork
2019-05-06 18:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-06 19:00 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-06 21:17 ` ✓ Fi.CI.IGT: " Patchwork
2019-05-14 14:29 ` [PATCH v5 00/11] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-05-16 15:44   ` Sam Ravnborg

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=fd69d05d-0634-15cc-18e6-8c81c82aafef@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sam@ravnborg.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.