lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 2 Sep 2016 16:18:22 +0100
From:   Emil Velikov <emil.l.velikov@...il.com>
To:     Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc:     "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Emil Velikov <emil.velikov@...labora.com>
Subject: Re: [PATCH v4 3/4] drm/i915: Use new CRC debugfs API

Hi Tomeu,

IMHO it would be better to split out the refactoring into preparatory
patch. It brings a minor change which (not 100% sure on that) should
not cause issues but is worth pointing out.

On 5 August 2016 at 11:45, Tomeu Vizoso <tomeu.vizoso@...labora.com> wrote:

> +static int do_set_crc_source(struct drm_device *dev, enum pipe pipe,
> +                            enum intel_pipe_crc_source source)
> +{

> +       if (source == INTEL_PIPE_CRC_SOURCE_NONE) {
Nit: use !source here or sourse != INTEL_PIPE_CRC_SOURCE_NONE
elsewhere in the code ?


> @@ -693,10 +718,11 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
>                 spin_unlock_irq(&pipe_crc->lock);
>         }
>
> -       pipe_crc->source = source;
> +       ret = do_set_crc_source(dev, pipe, source);
> +       if (ret)
> +               goto out;
>
We seem to have modified pipe_crc even if the new function fails.
Haven't check if it matters, but definatelly not ideal.


> @@ -720,15 +746,6 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
>                 spin_unlock_irq(&pipe_crc->lock);
>
>                 kfree(entries);
> -
> -               if (IS_G4X(dev))
> -                       g4x_undo_pipe_scramble_reset(dev, pipe);
> -               else if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
> -                       vlv_undo_pipe_scramble_reset(dev, pipe);
> -               else if (IS_HASWELL(dev) && pipe == PIPE_A)
> -                       hsw_trans_edp_pipe_A_crc_wa(dev, false);
> -
> -               hsw_enable_ips(crtc);
The above is the piece I have in mind:
With the introduction of do_set_crc_source() the above are executed
prior to the intel_wait_for_vblank() call.

Afaics this will not cause any functional change, then again I'm not
that familiar with the i915 vblank code.


> +int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name,
> +                             size_t *values_cnt)
> +{

> +       ret = do_set_crc_source(crtc->dev, crtc->index, source);
> +
> +       intel_display_power_put(dev_priv, power_domain);
> +
> +       *values_cnt = 5;
> +
Please don't overwrite values_cnt if the function fails.

Regards,
Emil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ