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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190403085341.2cxdgxqrjlwecx3n@sirius.home.kraxel.org>
Date:   Wed, 3 Apr 2019 10:53:41 +0200
From:   Gerd Hoffmann <kraxel@...hat.com>
To:     Daniel Vetter <daniel@...ll.ch>
Cc:     dri-devel <dri-devel@...ts.freedesktop.org>,
        Dave Airlie <airlied@...hat.com>,
        David Airlie <airlied@...ux.ie>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" 
        <virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH] drm/cirrus: rewrite and modernize driver.

> > +struct cirrus_device {
> > +       struct drm_device              *dev;
> 
> Why not embed drm_device? It's the latest rage :-)

Sure, can do that.

> > +void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
> > +                       struct drm_plane_state *old_state)
> > +{
> > +       struct drm_plane_state *state = pipe->plane.state;
> > +       struct drm_crtc *crtc = &pipe->crtc;
> > +       struct drm_rect rect;
> > +
> > +       if (drm_atomic_helper_damage_merged(old_state, state, &rect))
> > +               cirrus_fb_blit_rect(pipe->plane.state->fb, &rect);
> > +
> > +       if (crtc->state->event) {
> > +               spin_lock_irq(&crtc->dev->event_lock);
> > +               drm_crtc_send_vblank_event(crtc, crtc->state->event);
> > +               spin_unlock_irq(&crtc->dev->event_lock);
> > +               crtc->state->event = NULL;
> > +       }
> > +}

> > +static int cirrus_fb_dirty(struct drm_framebuffer *fb,
> > +                          struct drm_file *file_priv,
> > +                          unsigned int flags, unsigned int color,
> > +                          struct drm_clip_rect *clips,
> > +                          unsigned int num_clips)
> > +{
> > +       struct cirrus_device *cirrus = fb->dev->dev_private;
> > +
> > +       if (cirrus->pipe.plane.state->fb != fb)
> > +               return 0;
> > +
> > +       if (num_clips)
> > +               cirrus_fb_blit_clips(fb, clips, num_clips);
> > +       else
> > +               cirrus_fb_blit_fullscreen(fb);
> > +       return 0;
> > +}
> 
> Why not use the dirty helpers and implement dirty rect support in your
> main plane update function?

Dirty rect support is already there, see above.

So I can just remove cirrus_fb_dirty() and hook up
drm_atomic_helper_dirtyfb() instead.  Easy ;)

cheers,
  Gerd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ