drm/i915: clean up media reset on gm45
Subsystems (2)
PATCH 1/3 drm/i915: clean up media reset on gm45
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
v2: Stop claiming this fixes anything and return 0 if successful instead of stack garbage.
--- drivers/gpu/drm/i915/i915_drv.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +9 -8
@@ -798,28 +798,29 @@ static int i965_reset_complete(struct drm_device *dev)static int i965_do_reset (struct drm_device *dev) {int ret; -u8 gdrst;/* * Set the domains we want to reset (GRDOM/bits 2 and 3) as * well as the reset bit (GR/bit 0). Setting the GR bit * triggers the reset; when done, the hardware will clear it. */ -pci_read_config_byte (dev->pdev,I965_GDRST , &gdrst);pci_write_config_byte (dev->pdev,I965_GDRST , - gdrst |GRDOM_RENDER | -GRDOM_RESET_ENABLE ); +GRDOM_RENDER |GRDOM_RESET_ENABLE ); ret =wait_for (i965_reset_complete (dev),500 );if (ret)return ret;/* We can't reset render&media without also resetting display ... */ -pci_read_config_byte (dev->pdev,I965_GDRST , &gdrst);pci_write_config_byte (dev->pdev,I965_GDRST , - gdrst |GRDOM_MEDIA | -GRDOM_RESET_ENABLE ); +GRDOM_MEDIA |GRDOM_RESET_ENABLE ); -return wait_for (i965_reset_complete (dev),500 ); + ret =wait_for (i965_reset_complete (dev),500 ); +if (ret) +return ret; + +pci_write_config_byte (dev->pdev,I965_GDRST ,0 ); + +return 0 ; }static int ironlake_do_reset (struct drm_device *dev)
Signature · 1 line
1.8.3.1
PATCH 2/3 drm/i915: run the full gem hw init after a gpu reset
Otherwise we can't resurrect the bsd ring on gm45 completely. I've discovered this trick because module reload recovered the bsd ring, making it clear that it's not an issue with the hw or our reset code.
While touching the code update the comment to be a bit clearer about what we actually want to reinitialize and which pieces we better leave untouched.
Note: In my opinion this is not a stable candidate - historically such seemingly correct looking changes in the reset code have lead to big heaps of scary hilarity.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
--- drivers/gpu/drm/i915/i915_drv.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +6 -19
@@ -962,28 +962,15 @@ int i915_reset(struct drm_device *dev)*/ if (drm_core_check_feature (dev,DRIVER_MODESET ) || !dev_priv->mm.suspended) { -struct intel_ring_buffer *ring; -int i; - - dev_priv->mm.suspended =0 ; - -i915_gem_init_swizzling (dev); - -for_each_ring (ring, dev_priv, i) - ring->init (ring); - -i915_gem_context_init (dev); -if (dev_priv->mm.aliasing_ppgtt) { - ret = dev_priv->mm.aliasing_ppgtt->enable (dev); -if (ret) -i915_gem_cleanup_aliasing_ppgtt (dev); - } +int ret;/* -* It would make sense to re-init all the other hw state, at -* least the rps/rc6/emon init done within modeset_init_hw. For -* some unknown reason, this blows up my ilk, so don't. +* We have to be carefuly to not reinit hw state which is not +* reset. E.g. reinitializing rps/rc6 on ilk here results in a +* dead machine. */ + ret =i915_gem_init_hw (dev); +WARN (ret !=0 ,"gem hw init failed after reset: %i\n" , ret);mutex_unlock (&dev->struct_mutex);
Signature · 1 line
1.8.3.1
Re: [PATCH 2/3] drm/i915: run the full gem hw init after a gpu reset
Quoted 11 lines · Daniel Vetter
Otherwise we can't resurrect the bsd ring on gm45 completely. I've discovered this trick because module reload recovered the bsd ring, making it clear that it's not an issue with the hw or our reset code.
While touching the code update the comment to be a bit clearer about what we actually want to reinitialize and which pieces we better leave untouched.
Note: In my opinion this is not a stable candidate - historically such seemingly correct looking changes in the reset code have lead to big heaps of scary hilarity.
At the expense of leaking all allocated state from earlier. The magic ingredient here I guess is the resetting of the HWS. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 2/3] drm/i915: run the full gem hw init after a gpu reset
Quoted 9 lines · Chris Wilson
Quoted 8 lines · Daniel Vetter
Otherwise we can't resurrect the bsd ring on gm45 completely. I've discovered this trick because module reload recovered the bsd ring, making it clear that it's not an issue with the hw or our reset code.
While touching the code update the comment to be a bit clearer about what we actually want to reinitialize and which pieces we better leave untouched.
Quoted 6 lines
Quoted 3 lines
Note: In my opinion this is not a stable candidate - historically such seemingly correct looking changes in the reset code have lead to big heaps of scary hilarity.
At the expense of leaking all allocated state from earlier. The magic ingredient here I guess is the resetting of the HWS.
Meh, I've tried to forget how broken our init sequence is. I still think sharing the code is probably the right thing instead of adding a bunch of magic calls. I'll have a look how we could fix this best. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 1/1 drm/i915: reinit status page registers after gpu reset
In reply to Chris WilsonTbh I have no idea how this ever worked without rewriting the hws registers after a gpu reset.
To satisfy my OCD also give the functions a bit more consistent names:
- Use status_page everywhere, also for the physical addressed one.
- Use init for the allocation part and setup for the register setup part consistently.
Long term I'd really like to share the hw init parts completely between gpu reset, resume and driver load, i.e. to call i915_gem_init_hw instead of the individual pieces we might need.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +19 -10
@@ -379,6 +379,17 @@ u32 intel_ring_get_active_head(struct intel_ring_buffer *ring)return I915_READ (acthd_reg); } +static void ring_setup_phys_status_page (struct intel_ring_buffer *ring) +{ +struct drm_i915_private *dev_priv = ring->dev->dev_private; +u32 addr; + + addr = dev_priv->status_page_dmah->busaddr; +if (INTEL_INFO (ring->dev)->gen >=4 ) + addr |= (dev_priv->status_page_dmah->busaddr >>28 ) &0xf0 ; +I915_WRITE (HWS_PGA , addr); +} +static int init_ring_common (struct intel_ring_buffer *ring) {struct drm_device *dev = ring->dev;
@@ -390,6 +401,11 @@ static int init_ring_common(struct intel_ring_buffer *ring)if (HAS_FORCE_WAKE (dev))gen6_gt_force_wake_get (dev_priv); +if (I915_NEED_GFX_HWS (dev)) +intel_ring_setup_status_page (ring); +else +ring_setup_phys_status_page (ring); +/* Stop the ring if it's running. */ I915_WRITE_CTL (ring,0 );I915_WRITE_HEAD (ring,0 );
@@ -1223,7 +1239,6 @@ static int init_status_page(struct intel_ring_buffer *ring) ring->status_page.obj = obj;memset (ring->status_page.page_addr,0 ,PAGE_SIZE ); -intel_ring_setup_status_page (ring);DRM_DEBUG_DRIVER ("%s hws offset: 0x%08x\n" , ring->name, ring->status_page.gfx_addr);
@@ -1237,10 +1252,9 @@ err:return ret; } -static int init_phys_hws_pga (struct intel_ring_buffer *ring) +static int init_phys_status_page (struct intel_ring_buffer *ring) {struct drm_i915_private *dev_priv = ring->dev->dev_private; -u32 addr;if (!dev_priv->status_page_dmah) { dev_priv->status_page_dmah =
@@ -1249,11 +1263,6 @@ static int init_phys_hws_pga(struct intel_ring_buffer *ring)return -ENOMEM ; } - addr = dev_priv->status_page_dmah->busaddr; -if (INTEL_INFO (ring->dev)->gen >=4 ) - addr |= (dev_priv->status_page_dmah->busaddr >>28 ) &0xf0 ; -I915_WRITE (HWS_PGA , addr); - ring->status_page.page_addr = dev_priv->status_page_dmah->vaddr;memset (ring->status_page.page_addr,0 ,PAGE_SIZE );
@@ -1281,7 +1290,7 @@ static int intel_init_ring_buffer(struct drm_device *dev,return ret; }else {BUG_ON (ring->id !=RCS ); - ret =init_phys_hws_pga (ring); + ret =init_phys_status_page (ring);if (ret)return ret; }
@@ -1893,7 +1902,7 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size) }if (!I915_NEED_GFX_HWS (dev)) { - ret =init_phys_hws_pga (ring); + ret =init_phys_status_page (ring);if (ret)return ret; }
Signature · 1 line
1.8.3.1
PATCH 1/1 drm/i915: reinit status page registers after gpu reset
In reply to Chris WilsonThis fixes gpu reset on my gm45 - without this patch the bsd thing is forever stuck since the seqno updates never reach the status page.
Tbh I have no idea how this ever worked without rewriting the hws registers after a gpu reset.
To satisfy my OCD also give the functions a bit more consistent names:
- Use status_page everywhere, also for the physical addressed one.
- Use init for the allocation part and setup for the register setup part consistently.
Long term I'd really like to share the hw init parts completely between gpu reset, resume and driver load, i.e. to call i915_gem_init_hw instead of the individual pieces we might need.
v2: Add the missing paragraph to the commit message about what bug exactly this patch here fixes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +19 -10
@@ -379,6 +379,17 @@ u32 intel_ring_get_active_head(struct intel_ring_buffer *ring)return I915_READ (acthd_reg); } +static void ring_setup_phys_status_page (struct intel_ring_buffer *ring) +{ +struct drm_i915_private *dev_priv = ring->dev->dev_private; +u32 addr; + + addr = dev_priv->status_page_dmah->busaddr; +if (INTEL_INFO (ring->dev)->gen >=4 ) + addr |= (dev_priv->status_page_dmah->busaddr >>28 ) &0xf0 ; +I915_WRITE (HWS_PGA , addr); +} +static int init_ring_common (struct intel_ring_buffer *ring) {struct drm_device *dev = ring->dev;
@@ -390,6 +401,11 @@ static int init_ring_common(struct intel_ring_buffer *ring)if (HAS_FORCE_WAKE (dev))gen6_gt_force_wake_get (dev_priv); +if (I915_NEED_GFX_HWS (dev)) +intel_ring_setup_status_page (ring); +else +ring_setup_phys_status_page (ring); +/* Stop the ring if it's running. */ I915_WRITE_CTL (ring,0 );I915_WRITE_HEAD (ring,0 );
@@ -1223,7 +1239,6 @@ static int init_status_page(struct intel_ring_buffer *ring) ring->status_page.obj = obj;memset (ring->status_page.page_addr,0 ,PAGE_SIZE ); -intel_ring_setup_status_page (ring);DRM_DEBUG_DRIVER ("%s hws offset: 0x%08x\n" , ring->name, ring->status_page.gfx_addr);
@@ -1237,10 +1252,9 @@ err:return ret; } -static int init_phys_hws_pga (struct intel_ring_buffer *ring) +static int init_phys_status_page (struct intel_ring_buffer *ring) {struct drm_i915_private *dev_priv = ring->dev->dev_private; -u32 addr;if (!dev_priv->status_page_dmah) { dev_priv->status_page_dmah =
@@ -1249,11 +1263,6 @@ static int init_phys_hws_pga(struct intel_ring_buffer *ring)return -ENOMEM ; } - addr = dev_priv->status_page_dmah->busaddr; -if (INTEL_INFO (ring->dev)->gen >=4 ) - addr |= (dev_priv->status_page_dmah->busaddr >>28 ) &0xf0 ; -I915_WRITE (HWS_PGA , addr); - ring->status_page.page_addr = dev_priv->status_page_dmah->vaddr;memset (ring->status_page.page_addr,0 ,PAGE_SIZE );
@@ -1281,7 +1290,7 @@ static int intel_init_ring_buffer(struct drm_device *dev,return ret; }else {BUG_ON (ring->id !=RCS ); - ret =init_phys_hws_pga (ring); + ret =init_phys_status_page (ring);if (ret)return ret; }
@@ -1893,7 +1902,7 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size) }if (!I915_NEED_GFX_HWS (dev)) { - ret =init_phys_hws_pga (ring); + ret =init_phys_status_page (ring);if (ret)return ret; }
Signature · 1 line
1.8.3.1
Re: [PATCH] drm/i915: reinit status page registers after gpu reset
Quoted 15 lines · Daniel Vetter
This fixes gpu reset on my gm45 - without this patch the bsd thing is forever stuck since the seqno updates never reach the status page.
Tbh I have no idea how this ever worked without rewriting the hws registers after a gpu reset.
To satisfy my OCD also give the functions a bit more consistent names:
- Usestatus_pageeverywhere, also for the physical addressed one.
- Use init for the allocation part and setup for the register setup part consistently.Long term I'd really like to share the hw init parts completely between gpu reset, resume and driver load, i.e. to call
i915_gem_init_hwinstead of the individual pieces we might need.
Quoted 6 lines
v2: Add the missing paragraph to the commit message about what bug exactly this patch here fixes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Lots of low hanging fruit here for designating the phases of initialisation and what is required for reinitialisation, definitely requires a good renaming session and cleanup.
Well, I was hoping that this would also help bug 64725, but alas upon resume we do the full init, rather than the shortcut for reset.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Daniel Vetter
AppliedRe: [PATCH] drm/i915: reinit status page registers after gpu reset
Quoted 23 lines · Chris Wilson
Quoted 15 lines · Daniel Vetter
This fixes gpu reset on my gm45 - without this patch the bsd thing is forever stuck since the seqno updates never reach the status page.
Tbh I have no idea how this ever worked without rewriting the hws registers after a gpu reset.
To satisfy my OCD also give the functions a bit more consistent names:
- Usestatus_pageeverywhere, also for the physical addressed one.
- Use init for the allocation part and setup for the register setup part consistently.Long term I'd really like to share the hw init parts completely between gpu reset, resume and driver load, i.e. to call
i915_gem_init_hwinstead of the individual pieces we might need.Quoted 6 lines
v2: Add the missing paragraph to the commit message about what bug exactly this patch here fixes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65495
Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 8 lines
Lots of low hanging fruit here for designating the phases of initialisation and what is required for reinitialisation, definitely requires a good renaming session and cleanup.
Well, I was hoping that this would also help bug 64725, but alas upon resume we do the full init, rather than the shortcut for reset.
Reviewed-by Chris Wilson <[email protected]>
Picked up for -fixes, thanks for the review.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 3/3 drm/i915: WARN if the bios reserved range is bigger than stolen size
In reply to Daniel Vetter--- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_gem_stolen.c +2 -0
@@ -201,6 +201,8 @@ int i915_gem_init_stolen(struct drm_device *dev)if (IS_VALLEYVIEW (dev)) bios_reserved =1024 *1024 ;/* top 1M on VLV/BYT */ +WARN_ON (bios_reserved > dev_priv->gtt.stolen_size); +/* Basic memrange allocator for stolen space */ drm_mm_init (&dev_priv->mm.stolen,0 , dev_priv->gtt.stolen_size - bios_reserved);
Signature · 1 line
1.8.3.1
Re: [PATCH 3/3] drm/i915: WARN if the bios reserved range is bigger than stolen size
WARN and return or else we create an invalid stolen mm. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 6 lines · Daniel Vetter
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
"reserved; mbz" or "reserved; do not modify" ?
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 9 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
"reserved; mbz" or "reserved; do not modify" ?
"Reserved, Acccess: RO, Default value: 0" I guess that means we can't possible get something non-zero in there ...
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 5 lines · Daniel Vetter
Quoted 4 lines · Chris Wilson
Quoted 3 lines · Daniel Vetter
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
"reserved; mbz" or "reserved; do not modify" ?
"Reserved, Acccess: RO, Default value: 0" I guess that means we can't possible get something non-zero in there ...
Well they did leave that weasel word "default" in there... ;-)
But that is a little more convincing that we aren't going to clear hidden state.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
PATCH 1/2 drm/i915: clean up media reset on gm45
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
Note that Cspec is a bit confused and doesn't explicitly say that all the other bits in this register are "reserved, mbz" like usually. Instead they're marked as "r/o, default value = 0" which semantically amounts to the same thing.
v2: Stop claiming this fixes anything and return 0 if successful instead of stack garbage.
v3: Pimp the commit message to explain exactly why I think the docs allow us to ditch the rmw cycle, spurred by a discussion with Chris.
--- drivers/gpu/drm/i915/i915_drv.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +9 -8
@@ -798,28 +798,29 @@ static int i965_reset_complete(struct drm_device *dev)static int i965_do_reset (struct drm_device *dev) {int ret; -u8 gdrst;/* * Set the domains we want to reset (GRDOM/bits 2 and 3) as * well as the reset bit (GR/bit 0). Setting the GR bit * triggers the reset; when done, the hardware will clear it. */ -pci_read_config_byte (dev->pdev,I965_GDRST , &gdrst);pci_write_config_byte (dev->pdev,I965_GDRST , - gdrst |GRDOM_RENDER | -GRDOM_RESET_ENABLE ); +GRDOM_RENDER |GRDOM_RESET_ENABLE ); ret =wait_for (i965_reset_complete (dev),500 );if (ret)return ret;/* We can't reset render&media without also resetting display ... */ -pci_read_config_byte (dev->pdev,I965_GDRST , &gdrst);pci_write_config_byte (dev->pdev,I965_GDRST , - gdrst |GRDOM_MEDIA | -GRDOM_RESET_ENABLE ); +GRDOM_MEDIA |GRDOM_RESET_ENABLE ); -return wait_for (i965_reset_complete (dev),500 ); + ret =wait_for (i965_reset_complete (dev),500 ); +if (ret) +return ret; + +pci_write_config_byte (dev->pdev,I965_GDRST ,0 ); + +return 0 ; }static int ironlake_do_reset (struct drm_device *dev)
Signature · 1 line
1.8.3.2
PATCH 2/2 drm/i915: WARN if the bios reserved range is bigger than stolen size
v2: Bail out if we hit the WARN_ON to avoid fallout later on. Spotted by Chris Wilson.
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem_stolen.c +3 -0
@@ -218,6 +218,9 @@ int i915_gem_init_stolen(struct drm_device *dev)if (IS_VALLEYVIEW (dev)) bios_reserved =1024 *1024 ;/* top 1M on VLV/BYT */ +if (WARN_ON (bios_reserved > dev_priv->gtt.stolen_size)) +return 0 ; +/* Basic memrange allocator for stolen space */ drm_mm_init (&dev_priv->mm.stolen,0 , dev_priv->gtt.stolen_size - bios_reserved);
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] drm/i915: WARN if the bios reserved range is bigger than stolen size
Quoted 6 lines · Daniel Vetter
v2: Bail out if we hit the
WARN_ONto avoid fallout later on. Spotted by Chris Wilson.Suggested-by Chris Wilson <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Daniel Vetter
AppliedRe: [PATCH 2/2] drm/i915: WARN if the bios reserved range is bigger than stolen size
Quoted 8 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter
v2: Bail out if we hit the
WARN_ONto avoid fallout later on. Spotted by Chris Wilson.Suggested-by Chris Wilson <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Queued for -next, thanks for the review.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 12 lines · Daniel Vetter
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
Note that Cspec is a bit confused and doesn't explicitly say that all the other bits in this register are "reserved, mbz" like usually. Instead they're marked as "r/o, default value = 0" which semantically amounts to the same thing.
Quoted 8 lines
v2: Stop claiming this fixes anything and return 0 if successful instead of stack garbage.
v3: Pimp the commit message to explain exactly why I think the docs allow us to ditch the rmw cycle, spurred by a discussion with Chris.
Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Bugzilla?
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Daniel Vetter
AppliedQuoted 16 lines · Chris Wilson
Quoted 15 lines · Daniel Vetter
Originally I've thought that this fixes up the reset issues on my gm45, but that was just a red herring due to b0rked testing.
Still I much prefer writing the right values (all other fields are reserved) instead of potentially dragging gunk around. Hence also clear the register to 0 after a reset.
Note that Cspec is a bit confused and doesn't explicitly say that all the other bits in this register are "reserved, mbz" like usually. Instead they're marked as "r/o, default value = 0" which semantically amounts to the same thing.
v2: Stop claiming this fixes anything and return 0 if successful instead of stack garbage.
Quoted 6 lines
Quoted 5 lines
v3: Pimp the commit message to explain exactly why I think the docs allow us to ditch the rmw cycle, spurred by a discussion with Chris.
Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Bugzilla?
I've dropped the bugzilla ref since at most this is Inspired-by: which is a bit a useless tag. The bug itself was the lack of hw status page reinit, which is clearly a completely different issue.
Quoted 1 line
Reviewed-by Chris Wilson <[email protected]>
Queued for -next, thanks for the review.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch