All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilija Hadzic <ihadzic@research.bell-labs.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: fix for CRTC mutex corruption
Date: Tue, 29 Oct 2013 14:22:09 -0500 (CDT)	[thread overview]
Message-ID: <Pine.GSO.4.64.1310291407060.24085@umail> (raw)
In-Reply-To: <20131029184013.GA4167@phenom.ffwll.local>



On Tue, 29 Oct 2013, Daniel Vetter wrote:

> Aside: The horribly ad-hoc calling convetions with some of the (x, y, fb,
> mode) parameters being set before calling a lower-level functions, some
> being restored, some of them being the old backup value and some of them
> being expected to be updated by the called function really gives me the
> creeps.
>
> But fixing that is something for a _really_ slow week (month even ...).
>

I agree, I don't like it either. It's too tangled-up, but fixing it will 
probably be a major rework.

>> The actual fix is implemented in patch #6; preceding
>> 5 patches are necessary prerequisites.
>
> Hm, I don't really see why patches 1,2&4 are required. If we reorder them
> to the end of the series as follow-up cleanups then we'd only need to
> backport 3 patches. Which is imo reasonable.

1 and 2 could indeed be left out, but the end-result will look really ugly 
(e.g., x and y restoration will come from save_set.x and save_set.y, while 
frame buffer restoration will come from old_fb (and IMO, it's always 
better to first cleanup the code that one is about to touch and then make 
functional changes).

Patch 4, however, is required because of saving and restoration of 
'enabled' flag, but it could be split in two: the required part that 
restores the enabled flag that restores only the the 'enabled' flag and 
the cleanup part that eliminates unecessary restoration of hwmode field.

-- Ilija

  reply	other threads:[~2013-10-29 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 15:09 fix for CRTC mutex corruption Ilija Hadzic
2013-10-29 15:09 ` [PATCH 1/6] drm: remove redundant if statement Ilija Hadzic
2013-10-29 15:09 ` [PATCH 2/6] drm: eliminate old_fb from drm_crtc_helper_set_config Ilija Hadzic
2013-10-29 15:09 ` [PATCH 3/6] drm: restore crtc origin if mode_set_base fails Ilija Hadzic
2013-10-29 15:09 ` [PATCH 4/6] drm: fix error recovery path in drm_crtc_helper_set_mode Ilija Hadzic
2013-10-29 15:09 ` [PATCH 5/6] drm: do not set crtc enabled field twice Ilija Hadzic
2013-10-29 15:09 ` [PATCH 6/6] drm: eliminate bit-copy restoration of crtc Ilija Hadzic
2013-10-29 18:40 ` fix for CRTC mutex corruption Daniel Vetter
2013-10-29 19:22   ` Ilija Hadzic [this message]
2013-10-29 20:11     ` Daniel Vetter
2013-10-30 13:45       ` Ilija Hadzic

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=Pine.GSO.4.64.1310291407060.24085@umail \
    --to=ihadzic@research.bell-labs.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@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 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.